]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/issue-30240.stderr
Rollup merge of #94839 - TaKO8Ki:suggest-using-double-colon-for-struct-field-type...
[rust.git] / src / test / ui / pattern / usefulness / issue-30240.stderr
1 error[E0004]: non-exhaustive patterns: `&_` not covered
2   --> $DIR/issue-30240.rs:2:11
3    |
4 LL |     match "world" {
5    |           ^^^^^^^ pattern `&_` not covered
6    |
7    = note: the matched value is of type `&str`
8 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
9    |
10 LL ~         "hello" => {}
11 LL +         &_ => todo!()
12    |
13
14 error[E0004]: non-exhaustive patterns: `&_` not covered
15   --> $DIR/issue-30240.rs:6:11
16    |
17 LL |     match "world" {
18    |           ^^^^^^^ pattern `&_` not covered
19    |
20    = note: the matched value is of type `&str`
21 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
22    |
23 LL ~         "hello" => {}
24 LL +         &_ => todo!()
25    |
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0004`.