@@ -307,18 +307,21 @@ mod sealed {
307
307
use sealed:: IntoQueryParam ;
308
308
309
309
impl TyCtxt < ' tcx > {
310
+ #[ inline]
310
311
pub fn def_kind ( self , def_id : impl IntoQueryParam < DefId > ) -> DefKind {
311
312
let def_id = def_id. into_query_param ( ) ;
312
313
self . opt_def_kind ( def_id)
313
314
. unwrap_or_else ( || bug ! ( "def_kind: unsupported node: {:?}" , def_id) )
314
315
}
315
316
317
+ #[ inline]
316
318
pub fn fn_sig ( self , def_id : impl IntoQueryParam < DefId > ) -> ty:: PolyFnSig < ' tcx > {
317
319
let def_id = def_id. into_query_param ( ) ;
318
320
self . try_fn_sig ( def_id)
319
321
. unwrap_or_else ( |s| span_bug ! ( self . def_span( def_id) , "fn_sig: {}" , s) )
320
322
}
321
323
324
+ #[ inline]
322
325
pub fn type_of ( self , def_id : impl IntoQueryParam < DefId > ) -> Ty < ' tcx > {
323
326
let def_id = def_id. into_query_param ( ) ;
324
327
self . try_type_of ( def_id) . unwrap_or_else ( |msg| {
@@ -329,18 +332,21 @@ impl TyCtxt<'tcx> {
329
332
}
330
333
331
334
impl TyCtxtAt < ' tcx > {
335
+ #[ inline]
332
336
pub fn def_kind ( self , def_id : impl IntoQueryParam < DefId > ) -> DefKind {
333
337
let def_id = def_id. into_query_param ( ) ;
334
338
self . opt_def_kind ( def_id)
335
339
. unwrap_or_else ( || bug ! ( "def_kind: unsupported node: {:?}" , def_id) )
336
340
}
337
341
342
+ #[ inline]
338
343
pub fn fn_sig ( self , def_id : impl IntoQueryParam < DefId > ) -> ty:: PolyFnSig < ' tcx > {
339
344
let def_id = def_id. into_query_param ( ) ;
340
345
self . try_fn_sig ( def_id)
341
346
. unwrap_or_else ( |s| span_bug ! ( self . def_span( def_id) , "fn_sig: {}" , s) )
342
347
}
343
348
349
+ #[ inline]
344
350
pub fn type_of ( self , def_id : impl IntoQueryParam < DefId > ) -> Ty < ' tcx > {
345
351
let def_id = def_id. into_query_param ( ) ;
346
352
self . try_type_of ( def_id) . unwrap_or_else ( |msg| {
0 commit comments