@@ -285,13 +285,13 @@ pub trait PrettyPrinter<'gcx: 'tcx, 'tcx>:
285285 let mut cur_def_key = self . tcx ( ) . def_key ( def_id) ;
286286 debug ! ( "try_print_visible_def_path: cur_def_key={:?}" , cur_def_key) ;
287287
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>.
289289 match cur_def_key. disambiguated_data . data {
290- DefPathData :: StructCtor | DefPathData :: VariantCtor => {
290+ DefPathData :: Ctor => {
291291 let parent = DefId {
292292 krate : def_id. krate ,
293293 index : cur_def_key. parent
294- . expect ( "DefPathData::StructCtor /VariantData missing a parent" ) ,
294+ . expect ( "DefPathData::Ctor /VariantData missing a parent" ) ,
295295 } ;
296296
297297 cur_def_key = self . tcx ( ) . def_key ( parent) ;
@@ -864,8 +864,7 @@ impl TyCtxt<'_, '_, '_> {
864864 DefPathData :: AnonConst |
865865 DefPathData :: ConstParam ( ..) |
866866 DefPathData :: ClosureExpr |
867- DefPathData :: VariantCtor |
868- DefPathData :: StructCtor => Namespace :: ValueNS ,
867+ DefPathData :: Ctor => Namespace :: ValueNS ,
869868
870869 DefPathData :: MacroDef ( ..) => Namespace :: MacroNS ,
871870
@@ -1029,7 +1028,7 @@ impl<F: fmt::Write> Printer<'gcx, 'tcx> for FmtPrinter<'_, 'gcx, 'tcx, F> {
10291028
10301029 // Skip `::{{constructor}}` on tuple/unit structs.
10311030 match disambiguated_data. data {
1032- DefPathData :: StructCtor | DefPathData :: VariantCtor => return Ok ( self ) ,
1031+ DefPathData :: Ctor => return Ok ( self ) ,
10331032 _ => { }
10341033 }
10351034
0 commit comments