File tree 1 file changed +4
-0
lines changed
compiler/rustc_middle/src/ty
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,7 @@ impl<'tcx> InternalSubsts<'tcx> {
400
400
}
401
401
402
402
#[ inline]
403
+ #[ track_caller]
403
404
pub fn type_at ( & self , i : usize ) -> Ty < ' tcx > {
404
405
if let GenericArgKind :: Type ( ty) = self [ i] . unpack ( ) {
405
406
ty
@@ -409,6 +410,7 @@ impl<'tcx> InternalSubsts<'tcx> {
409
410
}
410
411
411
412
#[ inline]
413
+ #[ track_caller]
412
414
pub fn region_at ( & self , i : usize ) -> ty:: Region < ' tcx > {
413
415
if let GenericArgKind :: Lifetime ( lt) = self [ i] . unpack ( ) {
414
416
lt
@@ -418,6 +420,7 @@ impl<'tcx> InternalSubsts<'tcx> {
418
420
}
419
421
420
422
#[ inline]
423
+ #[ track_caller]
421
424
pub fn const_at ( & self , i : usize ) -> ty:: Const < ' tcx > {
422
425
if let GenericArgKind :: Const ( ct) = self [ i] . unpack ( ) {
423
426
ct
@@ -427,6 +430,7 @@ impl<'tcx> InternalSubsts<'tcx> {
427
430
}
428
431
429
432
#[ inline]
433
+ #[ track_caller]
430
434
pub fn type_for_def ( & self , def : & ty:: GenericParamDef ) -> GenericArg < ' tcx > {
431
435
self . type_at ( def. index as usize ) . into ( )
432
436
}
You can’t perform that action at this time.
0 commit comments