We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1bcfbc commit 2089886Copy full SHA for 2089886
compiler/rustc_lint/src/types.rs
@@ -1070,7 +1070,6 @@ fn is_niche_optimization_candidate<'tcx>(
1070
match ty.kind() {
1071
ty::Adt(ty_def, _) => {
1072
let non_exhaustive = ty_def.is_variant_list_non_exhaustive();
1073
- // Should single-variant enums be allowed?
1074
let empty = (ty_def.is_struct() && ty_def.all_fields().next().is_none())
1075
|| (ty_def.is_enum() && ty_def.variants().is_empty());
1076
0 commit comments