1
Fork 0

Check opaque types satisfy their bounds

This commit is contained in:
Matthew Jasper 2020-06-28 16:46:02 +01:00
parent b3057f4d5f
commit 5b279c8016
22 changed files with 158 additions and 36 deletions

View file

@ -1170,7 +1170,8 @@ impl<'a, 'tcx> Instantiator<'a, 'tcx> {
// This also instantiates nested instances of `impl Trait`.
let predicate = self.instantiate_opaque_types_in_map(&predicate);
let cause = traits::ObligationCause::new(span, self.body_id, traits::SizedReturnType);
let cause =
traits::ObligationCause::new(span, self.body_id, traits::MiscObligation);
// Require that the predicate holds for the concrete type.
debug!("instantiate_opaque_types: predicate={:?}", predicate);