File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
compiler/rustc_middle/src/ty Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -536,21 +536,28 @@ impl<'tcx> GenericArgs<'tcx> {
536
536
#[ inline]
537
537
#[ track_caller]
538
538
pub fn type_at ( & self , i : usize ) -> Ty < ' tcx > {
539
- self [ i] . as_type ( ) . unwrap_or_else ( || bug ! ( "expected type for param #{} in {:?}" , i, self ) )
539
+ self [ i] . as_type ( ) . unwrap_or_else (
540
+ #[ track_caller]
541
+ || bug ! ( "expected type for param #{} in {:?}" , i, self ) ,
542
+ )
540
543
}
541
544
542
545
#[ inline]
543
546
#[ track_caller]
544
547
pub fn region_at ( & self , i : usize ) -> ty:: Region < ' tcx > {
545
- self [ i]
546
- . as_region ( )
547
- . unwrap_or_else ( || bug ! ( "expected region for param #{} in {:?}" , i, self ) )
548
+ self [ i] . as_region ( ) . unwrap_or_else (
549
+ #[ track_caller]
550
+ || bug ! ( "expected region for param #{} in {:?}" , i, self ) ,
551
+ )
548
552
}
549
553
550
554
#[ inline]
551
555
#[ track_caller]
552
556
pub fn const_at ( & self , i : usize ) -> ty:: Const < ' tcx > {
553
- self [ i] . as_const ( ) . unwrap_or_else ( || bug ! ( "expected const for param #{} in {:?}" , i, self ) )
557
+ self [ i] . as_const ( ) . unwrap_or_else (
558
+ #[ track_caller]
559
+ || bug ! ( "expected const for param #{} in {:?}" , i, self ) ,
560
+ )
554
561
}
555
562
556
563
#[ inline]
You can’t perform that action at this time.
0 commit comments