1
Fork 0

Fix Inline MIR pass on a function with un-satisfiable bounds

This commit is contained in:
Michael Goulet 2022-01-17 20:38:38 -08:00
parent ee5d8d37ba
commit b651d5a1f4
4 changed files with 35 additions and 2 deletions

View file

@ -65,6 +65,8 @@ pub fn codegen_fulfill_obligation<'tcx>(
Err(Unimplemented) => {
// This can trigger when we probe for the source of a `'static` lifetime requirement
// on a trait object: `impl Foo for dyn Trait {}` has an implicit `'static` bound.
// This can also trigger when we have a global bound that is not actually satisfied,
// but was included during typeck due to the trivial_bounds feature.
infcx.tcx.sess.delay_span_bug(
rustc_span::DUMMY_SP,
&format!(