@@ -285,13 +285,13 @@ pub trait PrettyPrinter<'gcx: 'tcx, 'tcx>:
285
285
let mut cur_def_key = self . tcx ( ) . def_key ( def_id) ;
286
286
debug ! ( "try_print_visible_def_path: cur_def_key={:?}" , cur_def_key) ;
287
287
288
- // For a UnitStruct or TupleStruct we want the name of its parent rather than <unnamed>.
288
+ // For a constructor we want the name of its parent rather than <unnamed>.
289
289
match cur_def_key. disambiguated_data . data {
290
- DefPathData :: StructCtor | DefPathData :: VariantCtor => {
290
+ DefPathData :: Ctor => {
291
291
let parent = DefId {
292
292
krate : def_id. krate ,
293
293
index : cur_def_key. parent
294
- . expect ( "DefPathData::StructCtor /VariantData missing a parent" ) ,
294
+ . expect ( "DefPathData::Ctor /VariantData missing a parent" ) ,
295
295
} ;
296
296
297
297
cur_def_key = self . tcx ( ) . def_key ( parent) ;
@@ -864,8 +864,7 @@ impl TyCtxt<'_, '_, '_> {
864
864
DefPathData :: AnonConst |
865
865
DefPathData :: ConstParam ( ..) |
866
866
DefPathData :: ClosureExpr |
867
- DefPathData :: VariantCtor |
868
- DefPathData :: StructCtor => Namespace :: ValueNS ,
867
+ DefPathData :: Ctor => Namespace :: ValueNS ,
869
868
870
869
DefPathData :: MacroDef ( ..) => Namespace :: MacroNS ,
871
870
@@ -1029,7 +1028,7 @@ impl<F: fmt::Write> Printer<'gcx, 'tcx> for FmtPrinter<'_, 'gcx, 'tcx, F> {
1029
1028
1030
1029
// Skip `::{{constructor}}` on tuple/unit structs.
1031
1030
match disambiguated_data. data {
1032
- DefPathData :: StructCtor | DefPathData :: VariantCtor => return Ok ( self ) ,
1031
+ DefPathData :: Ctor => return Ok ( self ) ,
1033
1032
_ => { }
1034
1033
}
1035
1034
0 commit comments