rust/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
597 B
Plaintext
Raw Normal View History

2022-12-23 14:02:23 -06:00
error[E0005]: refutable pattern in function argument
2018-12-25 09:56:47 -06:00
--> $DIR/refutable-pattern-in-fn-arg.rs:2:14
2018-08-08 07:28:26 -05:00
|
LL | let f = |3: isize| println!("hello");
2023-10-12 17:20:06 -05:00
| ^ patterns `..=2_isize` and `4_isize..` not covered
|
= note: the matched value is of type `isize`
2023-02-27 14:50:01 -06:00
help: alternatively, you could prepend the pattern with an underscore to define a new named variable; identifiers cannot begin with digits
|
LL | let f = |_3: isize| println!("hello");
| +
2018-08-08 07:28:26 -05:00
error: aborting due to 1 previous error
2018-08-08 07:28:26 -05:00
For more information about this error, try `rustc --explain E0005`.