Skip to content

Commit ab68746

Browse files
committed
Use DefineOpaqueTypes::Yes in diagnostics code
1 parent 7168c13 commit ab68746

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
@@ -3802,7 +3802,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
38023802
self.probe(|_| {
38033803
match self
38043804
.at(&ObligationCause::misc(expr.span, body_id), param_env)
3805-
.eq(DefineOpaqueTypes::No, expected, actual)
3805+
// Doesn't actually matter if we define opaque types here, this is just used for
3806+
// diagnostics, and the result is never kept around.
3807+
.eq(DefineOpaqueTypes::Yes, expected, actual)
38063808
{
38073809
Ok(_) => (), // We ignore nested obligations here for now.
38083810
Err(err) => type_diffs.push(err),

0 commit comments

Comments
 (0)