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 764f64f commit 437ca26Copy full SHA for 437ca26
compiler/rustc_lint/src/types.rs
@@ -1115,7 +1115,6 @@ fn is_niche_optimization_candidate<'tcx>(
1115
match ty.kind() {
1116
ty::Adt(ty_def, _) => {
1117
let non_exhaustive = ty_def.is_variant_list_non_exhaustive();
1118
- // Should single-variant enums be allowed?
1119
let empty = (ty_def.is_struct() && ty_def.all_fields().next().is_none())
1120
|| (ty_def.is_enum() && ty_def.variants().is_empty());
1121
0 commit comments