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
|
2020-03-27 00:44:30 -05:00
|
|
|
|
|
|
|
|
= 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
|
|
|
|
2023-11-21 09:44:16 -06: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`.
|