1
Fork 0

Allow constraining opaque types during auto trait casting

This commit is contained in:
Oli Scherer 2024-05-27 10:44:35 +00:00
parent cbadf786bc
commit 4a86ef6f4c
5 changed files with 30 additions and 32 deletions

View file

@ -1161,7 +1161,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
let InferOk { mut obligations, .. } = self
.infcx
.at(&obligation.cause, obligation.param_env)
.sup(DefineOpaqueTypes::No, target, source_trait)
.sup(DefineOpaqueTypes::Yes, target, source_trait)
.map_err(|_| Unimplemented)?;
// Register one obligation for 'a: 'b.