mirror of https://github.com/KaiserY/trpl-zh-cn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
530 B
16 lines
530 B
$ cargo run
|
|
Compiling patterns v0.1.0 (file:///projects/patterns)
|
|
warning: irrefutable `let...else` pattern
|
|
--> src/main.rs:2:5
|
|
|
|
|
2 | let x = 5 else {
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: this pattern will always match, so the `else` clause is useless
|
|
= help: consider removing the `else` clause
|
|
= note: `#[warn(irrefutable_let_patterns)]` on by default
|
|
|
|
warning: `patterns` (bin "patterns") generated 1 warning
|
|
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.39s
|
|
Running `target/debug/patterns`
|