Merge DefPathData::VariantCtor and DefPathData::StructCtor

This commit is contained in:
Vadim Petrochenkov 2019-03-24 17:49:58 +03:00
parent 5bcf9f4f11
commit 2cbc25e6fc
12 changed files with 26 additions and 38 deletions

View file

@ -150,8 +150,7 @@ impl<'tcx> InstanceDef<'tcx> {
_ => return true
};
match tcx.def_key(def_id).disambiguated_data.data {
DefPathData::StructCtor | DefPathData::VariantCtor |
DefPathData::ClosureExpr => true,
DefPathData::Ctor | DefPathData::ClosureExpr => true,
_ => false
}
}