Skip to content

Commit 4a5468b

Browse files
committed
Add inline directives.
1 parent 97008d4 commit 4a5468b

File tree

1 file changed

+6
-0
lines changed
  • compiler/rustc_middle/src/ty/query

1 file changed

+6
-0
lines changed

compiler/rustc_middle/src/ty/query/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -307,18 +307,21 @@ mod sealed {
307307
use sealed::IntoQueryParam;
308308

309309
impl TyCtxt<'tcx> {
310+
#[inline]
310311
pub fn def_kind(self, def_id: impl IntoQueryParam<DefId>) -> DefKind {
311312
let def_id = def_id.into_query_param();
312313
self.opt_def_kind(def_id)
313314
.unwrap_or_else(|| bug!("def_kind: unsupported node: {:?}", def_id))
314315
}
315316

317+
#[inline]
316318
pub fn fn_sig(self, def_id: impl IntoQueryParam<DefId>) -> ty::PolyFnSig<'tcx> {
317319
let def_id = def_id.into_query_param();
318320
self.try_fn_sig(def_id)
319321
.unwrap_or_else(|s| span_bug!(self.def_span(def_id), "fn_sig: {}", s))
320322
}
321323

324+
#[inline]
322325
pub fn type_of(self, def_id: impl IntoQueryParam<DefId>) -> Ty<'tcx> {
323326
let def_id = def_id.into_query_param();
324327
self.try_type_of(def_id).unwrap_or_else(|msg| {
@@ -329,18 +332,21 @@ impl TyCtxt<'tcx> {
329332
}
330333

331334
impl TyCtxtAt<'tcx> {
335+
#[inline]
332336
pub fn def_kind(self, def_id: impl IntoQueryParam<DefId>) -> DefKind {
333337
let def_id = def_id.into_query_param();
334338
self.opt_def_kind(def_id)
335339
.unwrap_or_else(|| bug!("def_kind: unsupported node: {:?}", def_id))
336340
}
337341

342+
#[inline]
338343
pub fn fn_sig(self, def_id: impl IntoQueryParam<DefId>) -> ty::PolyFnSig<'tcx> {
339344
let def_id = def_id.into_query_param();
340345
self.try_fn_sig(def_id)
341346
.unwrap_or_else(|s| span_bug!(self.def_span(def_id), "fn_sig: {}", s))
342347
}
343348

349+
#[inline]
344350
pub fn type_of(self, def_id: impl IntoQueryParam<DefId>) -> Ty<'tcx> {
345351
let def_id = def_id.into_query_param();
346352
self.try_type_of(def_id).unwrap_or_else(|msg| {

0 commit comments

Comments
 (0)