@@ -1217,7 +1217,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
12171217 | ( hir:: def:: DefKind :: AssocConst , ty:: TermKind :: Const ( _) ) => ( ) ,
12181218 ( _, _) => {
12191219 let got = if let Some ( _) = term. ty ( ) { "type" } else { "constant" } ;
1220- let expected = def_kind . descr ( assoc_item_def_id) ;
1220+ let expected = tcx . def_descr ( assoc_item_def_id) ;
12211221 let mut err = tcx. sess . struct_span_err (
12221222 binding. span ,
12231223 & format ! ( "expected {expected} bound, found {got}" ) ,
@@ -1552,7 +1552,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
15521552 i. bottom( ) . 1 ,
15531553 E0038 ,
15541554 "the {} `{}` cannot be made into an object" ,
1555- tcx. def_kind ( def_id ) . descr ( def_id) ,
1555+ tcx. def_descr ( def_id) ,
15561556 tcx. item_name( def_id) ,
15571557 ) ;
15581558 err. note (
@@ -2174,7 +2174,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
21742174 "`{}` could{} refer to the {} defined here" ,
21752175 assoc_ident,
21762176 also,
2177- kind . descr ( def_id)
2177+ tcx . def_kind_descr ( kind , def_id)
21782178 ) ;
21792179 lint. span_note ( tcx. def_span ( def_id) , & note_msg) ;
21802180 } ;
@@ -2350,7 +2350,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
23502350 let kind = DefKind :: AssocTy ;
23512351
23522352 if !tcx. visibility ( item) . is_accessible_from ( def_scope, tcx) {
2353- let kind = kind . descr ( item) ;
2353+ let kind = tcx . def_kind_descr ( kind , item) ;
23542354 let msg = format ! ( "{kind} `{name}` is private" ) ;
23552355 let def_span = tcx. def_span ( item) ;
23562356 tcx. sess
0 commit comments