Skip to content

Commit 374e924

Browse files
committed
Use DefineOpaqueTypes::Yes in diagnostics code
1 parent 52dba5f commit 374e924

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
@@ -3814,7 +3814,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
38143814
self.probe(|_| {
38153815
match self
38163816
.at(&ObligationCause::misc(expr.span, body_id), param_env)
3817-
.eq(DefineOpaqueTypes::No, expected, actual)
3817+
// Doesn't actually matter if we define opaque types here, this is just used for
3818+
// diagnostics, and the result is never kept around.
3819+
.eq(DefineOpaqueTypes::Yes, expected, actual)
38183820
{
38193821
Ok(_) => (), // We ignore nested obligations here for now.
38203822
Err(err) => type_diffs.push(err),

0 commit comments

Comments
 (0)