Closed
Description
Given this code:
struct S(());
fn main() {
let array = [S(())];
match array {
[()] => {}
_ => {}
}
}
The current output is:
error[E0308]: mismatched types
--> src/main.rs:7:10
|
6 | match array {
| ----- this expression has type `[S; 1]`
7 | [()] => {}
| ^^ expected struct `S`, found `()`
|
help: you might have meant to use field `0` whose type is `()`
|
6 | match array.0 {
| ~~~~~~~
For more information about this error, try `rustc --explain E0308`.
error: could not compile `playground` due to previous error
We should suppress the help:
suggestion in this case, since it's not possible to apply that change.