Skip to content

Commit d9bb93f

Browse files
committed
Fix some doctests where the main function returns an opaque type
1 parent be153f0 commit d9bb93f

File tree

1 file changed

+5
-0
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+5
-0
lines changed

compiler/rustc_trait_selection/src/traits/codegen.rs

+5
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ pub fn codegen_fulfill_obligation<'tcx>(
9090
});
9191
let impl_source = drain_fulfillment_cx_or_panic(&infcx, &mut fulfill_cx, impl_source);
9292

93+
// We may constrain the hidden types of opaque types in this query, but this is
94+
// not information our callers need, as all that information is handled by borrowck
95+
// and typeck.
96+
drop(infcx.inner.borrow_mut().opaque_type_storage.take_opaque_types());
97+
9398
debug!("Cache miss: {:?} => {:?}", trait_ref, impl_source);
9499
Ok(impl_source)
95100
})

0 commit comments

Comments
 (0)