Skip to content

Commit b54d722

Browse files
committed
Use DefineOpaqueTypes::Yes in diagnostics code
1 parent 29fe618 commit b54d722

File tree

1 file changed

+3
-1
lines changed
  • compiler/rustc_trait_selection/src/traits/error_reporting

1 file changed

+3
-1
lines changed

compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3842,7 +3842,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
38423842
self.probe(|_| {
38433843
match self
38443844
.at(&ObligationCause::misc(expr.span, body_id), param_env)
3845-
.eq(DefineOpaqueTypes::No, expected, actual)
3845+
// Doesn't actually matter if we define opaque types here, this is just used for
3846+
// diagnostics, and the result is never kept around.
3847+
.eq(DefineOpaqueTypes::Yes, expected, actual)
38463848
{
38473849
Ok(_) => (), // We ignore nested obligations here for now.
38483850
Err(err) => type_diffs.push(err),

0 commit comments

Comments
 (0)