about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-10-25 19:51:15 +0200
committerGitHub <noreply@github.com>2023-10-25 19:51:15 +0200
commit26a9e08f0cffa534d16deb10ad9a2a483c789ad8 (patch)
treebd2d2d250eff34b8dc835840f1037349fb1d0961 /src
parent74c2b987fb396b058ce6cb682345735baa0a667c (diff)
parentbeaf46f7e5a103207e8c2f8c9ffe8409f487168d (diff)
Rollup merge of #117159 - oli-obk:error_shenanigans, r=estebank
Work around the fact that `check_mod_type_wf` may spuriously return `ErrorGuaranteed`

Even if that error is only emitted by `check_mod_item_types`.

fixes https://github.com/rust-lang/rust/issues/117153

A cleaner refactoring would merge/chain these queries in ways that ensure we only actually get an `ErrorGuaranteed` if there was an error emitted.
Diffstat (limited to 'src')
-rw-r--r--src/tools/clippy/tests/ui/crashes/ice-6252.stderr14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/tools/clippy/tests/ui/crashes/ice-6252.stderr b/src/tools/clippy/tests/ui/crashes/ice-6252.stderr
index 30be9dde73c..f929bec9583 100644
--- a/src/tools/clippy/tests/ui/crashes/ice-6252.stderr
+++ b/src/tools/clippy/tests/ui/crashes/ice-6252.stderr
@@ -24,6 +24,16 @@ help: you might be missing a type parameter
 LL | impl<N, M, VAL> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}
    |          +++++
 
-error: aborting due to 2 previous errors
+error[E0046]: not all trait items implemented, missing: `VAL`
+  --> $DIR/ice-6252.rs:11:1
+   |
+LL |     const VAL: T;
+   |     ------------ `VAL` from trait
+...
+LL | impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `VAL` in implementation
+
+error: aborting due to 3 previous errors
 
-For more information about this error, try `rustc --explain E0412`.
+Some errors have detailed explanations: E0046, E0412.
+For more information about an error, try `rustc --explain E0046`.