fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0381]: used binding `x` isn't initialized 2 --> $DIR/pattern-matching-should-fail.rs:8:23 3 | 4LL | let x: !; 5 | - binding declared here but left uninitialized 6LL | let c1 = || match x { }; 7 | ^ `x` used here but it isn't initialized 8 9error[E0381]: used binding `x` isn't initialized 10 --> $DIR/pattern-matching-should-fail.rs:15:14 11 | 12LL | let x: !; 13 | - binding declared here but left uninitialized 14LL | let c2 = || match x { _ => () }; 15 | ^^ - borrow occurs due to use in closure 16 | | 17 | `x` used here but it isn't initialized 18 19error[E0381]: used binding `variant` isn't initialized 20 --> $DIR/pattern-matching-should-fail.rs:27:13 21 | 22LL | let variant: !; 23 | ------- binding declared here but left uninitialized 24LL | let c = || { 25 | ^^ `variant` used here but it isn't initialized 26LL | 27LL | match variant { 28 | ------- borrow occurs due to use in closure 29 30error[E0381]: used binding `variant` isn't initialized 31 --> $DIR/pattern-matching-should-fail.rs:39:13 32 | 33LL | let variant: !; 34 | ------- binding declared here but left uninitialized 35LL | let c = || { 36 | ^^ `variant` used here but it isn't initialized 37LL | match variant { 38 | ------- borrow occurs due to use in closure 39 40error[E0381]: used binding `g` isn't initialized 41 --> $DIR/pattern-matching-should-fail.rs:54:15 42 | 43LL | let g: !; 44 | - binding declared here but left uninitialized 45... 46LL | match g { }; 47 | ^ `g` used here but it isn't initialized 48 49error[E0381]: used binding `t` isn't initialized 50 --> $DIR/pattern-matching-should-fail.rs:56:19 51 | 52LL | let t: !; 53 | - binding declared here but left uninitialized 54... 55LL | match t { }; 56 | ^ `t` used here but it isn't initialized 57 58error[E0004]: non-exhaustive patterns: type `u8` is non-empty 59 --> $DIR/pattern-matching-should-fail.rs:67:23 60 | 61LL | let c1 = || match x { }; 62 | ^ 63 | 64 = note: the matched value is of type `u8` 65help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown 66 | 67LL ~ let c1 = || match x { 68LL + _ => todo!(), 69LL ~ }; 70 | 71 72error[E0381]: used binding `x` isn't initialized 73 --> $DIR/pattern-matching-should-fail.rs:67:23 74 | 75LL | let x: u8; 76 | - binding declared here but left uninitialized 77LL | let c1 = || match x { }; 78 | ^ `x` used here but it isn't initialized 79 | 80help: consider assigning a value 81 | 82LL | let x: u8 = 0; 83 | +++ 84 85error: aborting due to 8 previous errors 86 87Some errors have detailed explanations: E0004, E0381. 88For more information about an error, try `rustc --explain E0004`.