@@ -18,7 +18,6 @@ use rustc_middle::ty::{self, TyCtxt};
18
18
/// that type check should guarantee to us that all nested
19
19
/// obligations *could be* resolved if we wanted to.
20
20
///
21
- /// Assumes that this is run after the entire crate has been successfully type-checked.
22
21
/// This also expects that `trait_ref` is fully normalized.
23
22
pub fn codegen_fulfill_obligation < ' tcx > (
24
23
tcx : TyCtxt < ' tcx > ,
@@ -101,7 +100,7 @@ pub fn codegen_fulfill_obligation<'tcx>(
101
100
/// Finishes processes any obligations that remain in the
102
101
/// fulfillment context, and then returns the result with all type
103
102
/// variables removed and regions erased. Because this is intended
104
- /// for use after type-check has completed , if any errors occur,
103
+ /// for use outside of type inference , if any errors occur,
105
104
/// it will panic. It is used during normalization and other cases
106
105
/// where processing the obligations in `fulfill_cx` may cause
107
106
/// type inference variables that appear in `result` to be
@@ -124,7 +123,10 @@ where
124
123
if !errors. is_empty ( ) {
125
124
infcx. tcx . sess . delay_span_bug (
126
125
rustc_span:: DUMMY_SP ,
127
- & format ! ( "Encountered errors `{:?}` resolving bounds after type-checking" , errors) ,
126
+ & format ! (
127
+ "Encountered errors `{:?}` resolving bounds outside of type inference" ,
128
+ errors
129
+ ) ,
128
130
) ;
129
131
}
130
132
0 commit comments