diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-10-27 11:48:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-27 11:48:06 +0200 |
| commit | 5459333ffc4a0838b59a7576b68f27f7cad2970a (patch) | |
| tree | 9adc094507bebb6126159dfd35aabf8550e0762d /compiler/rustc_errors/src | |
| parent | 203292e4891bb8754247c1a5bdf19a1b936c03ad (diff) | |
| parent | 1836c1fbbdf0d6902da9a2d2473dbc72f371eb2e (diff) | |
| download | rust-5459333ffc4a0838b59a7576b68f27f7cad2970a.tar.gz rust-5459333ffc4a0838b59a7576b68f27f7cad2970a.zip | |
Rollup merge of #117241 - compiler-errors:auto-trait-leak-cycle, r=oli-obk
Stash and cancel cycle errors for auto trait leakage in opaques We don't need to emit a traditional cycle error when we have a selection error that explains what's going on but in more detail. We may want to augment this error to actually point out the cycle, now that the cycle error is not being emitted. We could do that by storing the set of opaques that was in the `CyclePlaceholder` that gets returned from `type_of_opaque`. r? `@oli-obk` cc `@estebank` #117235
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index da74ee6391a..5e3fdf170bc 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -508,6 +508,8 @@ pub enum StashKey { TraitMissingMethod, OpaqueHiddenTypeMismatch, MaybeForgetReturn, + /// Query cycle detected, stashing in favor of a better error. + Cycle, } fn default_track_diagnostic(d: &mut Diagnostic, f: &mut dyn FnMut(&mut Diagnostic)) { |
