Fail more aggressively
This commit is contained in:
parent
264cd05b16
commit
f42a6793ce
1 changed files with 5 additions and 4 deletions
|
@ -92,10 +92,11 @@ pub fn codegen_fulfill_obligation<'tcx>(
|
||||||
});
|
});
|
||||||
let impl_source = drain_fulfillment_cx_or_panic(&infcx, &mut fulfill_cx, impl_source);
|
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
|
// There should be no opaque types during codegen, they all get revealed.
|
||||||
// not information our callers need, as all that information is handled by borrowck
|
let opaque_types = infcx.inner.borrow_mut().opaque_type_storage.take_opaque_types();
|
||||||
// and typeck.
|
if !opaque_types.is_empty() {
|
||||||
drop(infcx.inner.borrow_mut().opaque_type_storage.take_opaque_types());
|
bug!("{:#?}", opaque_types);
|
||||||
|
}
|
||||||
|
|
||||||
debug!("Cache miss: {:?} => {:?}", trait_ref, impl_source);
|
debug!("Cache miss: {:?} => {:?}", trait_ref, impl_source);
|
||||||
Ok(&*tcx.arena.alloc(impl_source))
|
Ok(&*tcx.arena.alloc(impl_source))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue