We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87bef92 commit b805232Copy full SHA for b805232
src/test/ui/consts/match_ice.rs
@@ -1,11 +1,10 @@
1
-// compile-pass
2
// https://github.com/rust-lang/rust/issues/53708
3
4
struct S;
5
6
fn main() {
7
const C: &S = &S;
8
- match C {
9
- C => {}
+ match C { //~ ERROR non-exhaustive
+ C => {} // this is a common bug around constants and references in patterns
10
}
11
src/test/ui/consts/match_ice.stderr
@@ -0,0 +1,9 @@
+error[E0004]: non-exhaustive patterns: `&S` not covered
+ --> $DIR/match_ice.rs:7:11
+ |
+LL | match C { //~ ERROR non-exhaustive
+ | ^ pattern `&S` not covered
+
+error: aborting due to previous error
+For more information about this error, try `rustc --explain E0004`.
0 commit comments