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!(
});
let impl_source = drain_fulfillment_cx_or_panic(&infcx, &mut fulfill_cx, impl_source);
- // We may constrain the hidden types of opaque types in this query, but this is
- // not information our callers need, as all that information is handled by borrowck
- // and typeck.
- drop(infcx.inner.borrow_mut().opaque_type_storage.take_opaque_types());
-
debug!("Cache miss: {:?} => {:?}", trait_ref, impl_source);
Ok(&*tcx.arena.alloc(impl_source))
})