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
|
@ -2675,7 +2675,7 @@ impl VariantData {
|
|||
}
|
||||
|
||||
/// Return the `NodeId` of this variant's constructor, if it has one.
|
||||
pub fn ctor_id(&self) -> Option<NodeId> {
|
||||
pub fn ctor_node_id(&self) -> Option<NodeId> {
|
||||
match *self {
|
||||
VariantData::Struct(..) => None,
|
||||
VariantData::Tuple(_, id) | VariantData::Unit(id) => Some(id),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue