diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-02-21 10:38:54 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-04-04 10:01:44 +0000 |
| commit | b54d72264aebf88e1099004c52aac6e4a06affd8 (patch) | |
| tree | 60e68bd79e0d7c488b3dc7cc45e70c3ccee6c1a8 | |
| parent | 29fe618f750c5ff7f8fb75871e75280b569b4e67 (diff) | |
| download | rust-b54d72264aebf88e1099004c52aac6e4a06affd8.tar.gz rust-b54d72264aebf88e1099004c52aac6e4a06affd8.zip | |
Use `DefineOpaqueTypes::Yes` in diagnostics code
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index fe2691e9d4d..af90372b97c 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -3842,7 +3842,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { 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), |
