Merge DefPathData::VariantCtor and DefPathData::StructCtor
This commit is contained in:
parent
5bcf9f4f11
commit
2cbc25e6fc
12 changed files with 26 additions and 38 deletions
|
|
@ -947,11 +947,11 @@ impl<'a, 'tcx> CrateMetadata {
|
|||
return Lrc::new([]);
|
||||
}
|
||||
|
||||
// The attributes for a tuple struct are attached to the definition, not the ctor;
|
||||
// The attributes for a tuple struct/variant are attached to the definition, not the ctor;
|
||||
// we assume that someone passing in a tuple struct ctor is actually wanting to
|
||||
// look at the definition
|
||||
let def_key = self.def_key(node_id);
|
||||
let item_id = if def_key.disambiguated_data.data == DefPathData::StructCtor {
|
||||
let item_id = if def_key.disambiguated_data.data == DefPathData::Ctor {
|
||||
def_key.parent.unwrap()
|
||||
} else {
|
||||
node_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue