@@ -1217,7 +1217,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
1217
1217
| ( hir:: def:: DefKind :: AssocConst , ty:: TermKind :: Const ( _) ) => ( ) ,
1218
1218
( _, _) => {
1219
1219
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) ;
1221
1221
let mut err = tcx. sess . struct_span_err (
1222
1222
binding. span ,
1223
1223
& format ! ( "expected {expected} bound, found {got}" ) ,
@@ -1552,7 +1552,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
1552
1552
i. bottom( ) . 1 ,
1553
1553
E0038 ,
1554
1554
"the {} `{}` cannot be made into an object" ,
1555
- tcx. def_kind ( def_id ) . descr ( def_id) ,
1555
+ tcx. def_descr ( def_id) ,
1556
1556
tcx. item_name( def_id) ,
1557
1557
) ;
1558
1558
err. note (
@@ -2174,7 +2174,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
2174
2174
"`{}` could{} refer to the {} defined here" ,
2175
2175
assoc_ident,
2176
2176
also,
2177
- kind . descr ( def_id)
2177
+ tcx . def_kind_descr ( kind , def_id)
2178
2178
) ;
2179
2179
lint. span_note ( tcx. def_span ( def_id) , & note_msg) ;
2180
2180
} ;
@@ -2350,7 +2350,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
2350
2350
let kind = DefKind :: AssocTy ;
2351
2351
2352
2352
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) ;
2354
2354
let msg = format ! ( "{kind} `{name}` is private" ) ;
2355
2355
let def_span = tcx. def_span ( item) ;
2356
2356
tcx. sess
0 commit comments