mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2024-11-14 21:11:31 +08:00
17 lines
523 B
Plaintext
Executable File
17 lines
523 B
Plaintext
Executable File
$ 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: `#[warn(irrefutable_let_patterns)]` on by default
|
|
= note: this pattern will always match, so the `if let` is useless
|
|
= help: consider replacing the `if let` with a `let`
|
|
|
|
warning: `patterns` (bin "patterns") generated 1 warning
|
|
Finished dev [unoptimized + debuginfo] target(s) in 0.39s
|
|
Running `target/debug/patterns`
|
|
5
|