File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
compiler/rustc_trait_selection/src/traits Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -92,10 +92,11 @@ pub fn codegen_fulfill_obligation<'tcx>(
92
92
} ) ;
93
93
let impl_source = drain_fulfillment_cx_or_panic ( & infcx, & mut fulfill_cx, impl_source) ;
94
94
95
- // We may constrain the hidden types of opaque types in this query, but this is
96
- // not information our callers need, as all that information is handled by borrowck
97
- // and typeck.
98
- drop ( infcx. inner . borrow_mut ( ) . opaque_type_storage . take_opaque_types ( ) ) ;
95
+ // There should be no opaque types during codegen, they all get revealed.
96
+ let opaque_types = infcx. inner . borrow_mut ( ) . opaque_type_storage . take_opaque_types ( ) ;
97
+ if !opaque_types. is_empty ( ) {
98
+ bug ! ( "{:#?}" , opaque_types) ;
99
+ }
99
100
100
101
debug ! ( "Cache miss: {:?} => {:?}" , trait_ref, impl_source) ;
101
102
Ok ( & * tcx. arena . alloc ( impl_source) )
You can’t perform that action at this time.
0 commit comments