@@ -898,7 +898,10 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for BoundVarReplacer<'_, 'tcx> {
898
898
if debruijn. as_usize ( ) + 1
899
899
> self . current_index . as_usize ( ) + self . universe_indices . len ( ) =>
900
900
{
901
- bug ! ( "Bound vars outside of `self.universe_indices`" ) ;
901
+ bug ! (
902
+ "Bound vars {r:#?} outside of `self.universe_indices`: {:#?}" ,
903
+ self . universe_indices
904
+ ) ;
902
905
}
903
906
ty:: ReLateBound ( debruijn, br) if debruijn >= self . current_index => {
904
907
let universe = self . universe_for ( debruijn) ;
@@ -916,7 +919,10 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for BoundVarReplacer<'_, 'tcx> {
916
919
if debruijn. as_usize ( ) + 1
917
920
> self . current_index . as_usize ( ) + self . universe_indices . len ( ) =>
918
921
{
919
- bug ! ( "Bound vars outside of `self.universe_indices`" ) ;
922
+ bug ! (
923
+ "Bound vars {t:#?} outside of `self.universe_indices`: {:#?}" ,
924
+ self . universe_indices
925
+ ) ;
920
926
}
921
927
ty:: Bound ( debruijn, bound_ty) if debruijn >= self . current_index => {
922
928
let universe = self . universe_for ( debruijn) ;
@@ -935,7 +941,10 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for BoundVarReplacer<'_, 'tcx> {
935
941
if debruijn. as_usize ( ) + 1
936
942
> self . current_index . as_usize ( ) + self . universe_indices . len ( ) =>
937
943
{
938
- bug ! ( "Bound vars outside of `self.universe_indices`" ) ;
944
+ bug ! (
945
+ "Bound vars {ct:#?} outside of `self.universe_indices`: {:#?}" ,
946
+ self . universe_indices
947
+ ) ;
939
948
}
940
949
ty:: ConstKind :: Bound ( debruijn, bound_const) if debruijn >= self . current_index => {
941
950
let universe = self . universe_for ( debruijn) ;
0 commit comments