summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch18-patterns-and-matching/listing-18-10/output.txt
blob: 6488fb29ca4bc845eb0c3769e6cd72429840b892 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ 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`
  = note: `#[warn(irrefutable_let_patterns)]` on by default

warning: `patterns` (bin "patterns") generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 0.39s
     Running `target/debug/patterns`
5