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> {
536536 #[ inline]
537537 #[ track_caller]
538538 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+ )
540543 }
541544
542545 #[ inline]
543546 #[ track_caller]
544547 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+ )
548552 }
549553
550554 #[ inline]
551555 #[ track_caller]
552556 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+ )
554561 }
555562
556563 #[ inline]
You can’t perform that action at this time.
0 commit comments