Auto merge of #103578 - petrochenkov:nofict, r=nagisa
Unreserve braced enum variants in value namespace With this PR braced enum variants (`enum E { V { /*...*/ } }`) no longer take a slot in value namespace, so the special case mentioned in the note in https://github.com/rust-lang/rfcs/blob/master/text/1506-adt-kinds.md#braced-structs is removed. Report - https://github.com/rust-lang/rust/pull/103578#issuecomment-1292594900.
This commit is contained in:
commit
b7463e8bdb
71 changed files with 364 additions and 642 deletions
|
@ -350,7 +350,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
} else {
|
||||
def.non_enum_variant()
|
||||
};
|
||||
if !including_tuple_field.0 && variant.ctor_kind == CtorKind::Fn {
|
||||
if !including_tuple_field.0 && variant.ctor_kind() == Some(CtorKind::Fn) {
|
||||
return None;
|
||||
}
|
||||
Some(variant.fields[field.index()].name.to_string())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue