Use DefineOpaqueTypes::Yes in diagnostics code

This commit is contained in:
Oli Scherer 2024-02-21 10:38:54 +00:00
parent 29fe618f75
commit b54d72264a

View File

@ -3842,7 +3842,9 @@ fn note_function_argument_obligation<G: EmissionGuarantee>(
self.probe(|_| {
match self
.at(&ObligationCause::misc(expr.span, body_id), param_env)
.eq(DefineOpaqueTypes::No, expected, actual)
// Doesn't actually matter if we define opaque types here, this is just used for
// diagnostics, and the result is never kept around.
.eq(DefineOpaqueTypes::Yes, expected, actual)
{
Ok(_) => (), // We ignore nested obligations here for now.
Err(err) => type_diffs.push(err),