@@ -18,7 +18,6 @@ use rustc_middle::ty::{self, TyCtxt};
1818/// that type check should guarantee to us that all nested
1919/// obligations *could be* resolved if we wanted to.
2020///
21- /// Assumes that this is run after the entire crate has been successfully type-checked.
2221/// This also expects that `trait_ref` is fully normalized.
2322pub fn codegen_fulfill_obligation < ' tcx > (
2423 tcx : TyCtxt < ' tcx > ,
@@ -101,7 +100,7 @@ pub fn codegen_fulfill_obligation<'tcx>(
101100/// Finishes processes any obligations that remain in the
102101/// fulfillment context, and then returns the result with all type
103102/// 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,
105104/// it will panic. It is used during normalization and other cases
106105/// where processing the obligations in `fulfill_cx` may cause
107106/// type inference variables that appear in `result` to be
@@ -123,7 +122,10 @@ where
123122 if let Err ( errors) = fulfill_cx. select_all_or_error ( infcx) {
124123 infcx. tcx . sess . delay_span_bug (
125124 rustc_span:: DUMMY_SP ,
126- & format ! ( "Encountered errors `{:?}` resolving bounds after type-checking" , errors) ,
125+ & format ! (
126+ "Encountered errors `{:?}` resolving bounds outside of type inference" ,
127+ errors
128+ ) ,
127129 ) ;
128130 }
129131
0 commit comments