2022-02-06 16:43:51 +08:00
|
|
|
$ cargo run
|
|
|
|
Compiling patterns v0.1.0 (file:///projects/patterns)
|
|
|
|
warning: irrefutable `if let` pattern
|
|
|
|
--> src/main.rs:2:8
|
|
|
|
|
|
|
|
|
2 | if let x = 5 {
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this pattern will always match, so the `if let` is useless
|
|
|
|
= help: consider replacing the `if let` with a `let`
|
2024-06-06 21:23:21 +08:00
|
|
|
= note: `#[warn(irrefutable_let_patterns)]` on by default
|
2022-02-06 16:43:51 +08:00
|
|
|
|
|
|
|
warning: `patterns` (bin "patterns") generated 1 warning
|
2024-06-06 21:23:21 +08:00
|
|
|
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.39s
|
2022-02-06 16:43:51 +08:00
|
|
|
Running `target/debug/patterns`
|
|
|
|
5
|