fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0004]: non-exhaustive patterns: `E::B` and `E::C` not covered 2 --> $DIR/non-exhaustive-defined-here.rs:35:11 3 | 4LL | match e1 { 5 | ^^ patterns `E::B` and `E::C` not covered 6 | 7note: `E` defined here 8 --> $DIR/non-exhaustive-defined-here.rs:14:5 9 | 10LL | enum E { 11 | - 12... 13LL | B, 14 | ^ not covered 15... 16LL | C 17 | ^ not covered 18 = note: the matched value is of type `E` 19help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms 20 | 21LL ~ E::A => {}, 22LL + E::B | E::C => todo!() 23 | 24 25error[E0005]: refutable pattern in local binding 26 --> $DIR/non-exhaustive-defined-here.rs:41:9 27 | 28LL | let E::A = e; 29 | ^^^^ patterns `E::B` and `E::C` not covered 30 | 31 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant 32 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html 33note: `E` defined here 34 --> $DIR/non-exhaustive-defined-here.rs:6:6 35 | 36LL | enum E { 37 | ^ 38... 39LL | B, 40 | - not covered 41... 42LL | C 43 | - not covered 44 = note: the matched value is of type `E` 45help: you might want to use `if let` to ignore the variants that aren't matched 46 | 47LL | if let E::A = e { todo!() }; 48 | ++ +++++++++++ 49 50error[E0004]: non-exhaustive patterns: `&E::B` and `&E::C` not covered 51 --> $DIR/non-exhaustive-defined-here.rs:50:11 52 | 53LL | match e { 54 | ^ patterns `&E::B` and `&E::C` not covered 55 | 56note: `E` defined here 57 --> $DIR/non-exhaustive-defined-here.rs:14:5 58 | 59LL | enum E { 60 | - 61... 62LL | B, 63 | ^ not covered 64... 65LL | C 66 | ^ not covered 67 = note: the matched value is of type `&E` 68help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms 69 | 70LL ~ E::A => {}, 71LL + &E::B | &E::C => todo!() 72 | 73 74error[E0005]: refutable pattern in local binding 75 --> $DIR/non-exhaustive-defined-here.rs:57:9 76 | 77LL | let E::A = e; 78 | ^^^^ patterns `&E::B` and `&E::C` not covered 79 | 80 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant 81 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html 82note: `E` defined here 83 --> $DIR/non-exhaustive-defined-here.rs:6:6 84 | 85LL | enum E { 86 | ^ 87... 88LL | B, 89 | - not covered 90... 91LL | C 92 | - not covered 93 = note: the matched value is of type `&E` 94help: you might want to use `if let` to ignore the variants that aren't matched 95 | 96LL | if let E::A = e { todo!() }; 97 | ++ +++++++++++ 98 99error[E0004]: non-exhaustive patterns: `&&mut &E::B` and `&&mut &E::C` not covered 100 --> $DIR/non-exhaustive-defined-here.rs:66:11 101 | 102LL | match e { 103 | ^ patterns `&&mut &E::B` and `&&mut &E::C` not covered 104 | 105note: `E` defined here 106 --> $DIR/non-exhaustive-defined-here.rs:14:5 107 | 108LL | enum E { 109 | - 110... 111LL | B, 112 | ^ not covered 113... 114LL | C 115 | ^ not covered 116 = note: the matched value is of type `&&mut &E` 117help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms 118 | 119LL ~ E::A => {}, 120LL + &&mut &E::B | &&mut &E::C => todo!() 121 | 122 123error[E0005]: refutable pattern in local binding 124 --> $DIR/non-exhaustive-defined-here.rs:73:9 125 | 126LL | let E::A = e; 127 | ^^^^ patterns `&&mut &E::B` and `&&mut &E::C` not covered 128 | 129 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant 130 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html 131note: `E` defined here 132 --> $DIR/non-exhaustive-defined-here.rs:6:6 133 | 134LL | enum E { 135 | ^ 136... 137LL | B, 138 | - not covered 139... 140LL | C 141 | - not covered 142 = note: the matched value is of type `&&mut &E` 143help: you might want to use `if let` to ignore the variants that aren't matched 144 | 145LL | if let E::A = e { todo!() }; 146 | ++ +++++++++++ 147 148error[E0004]: non-exhaustive patterns: `Opt::None` not covered 149 --> $DIR/non-exhaustive-defined-here.rs:92:11 150 | 151LL | match e { 152 | ^ pattern `Opt::None` not covered 153 | 154note: `Opt` defined here 155 --> $DIR/non-exhaustive-defined-here.rs:85:5 156 | 157LL | enum Opt { 158 | --- 159... 160LL | None, 161 | ^^^^ not covered 162 = note: the matched value is of type `Opt` 163help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown 164 | 165LL ~ Opt::Some(ref _x) => {}, 166LL + Opt::None => todo!() 167 | 168 169error[E0005]: refutable pattern in local binding 170 --> $DIR/non-exhaustive-defined-here.rs:99:9 171 | 172LL | let Opt::Some(ref _x) = e; 173 | ^^^^^^^^^^^^^^^^^ pattern `Opt::None` not covered 174 | 175 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant 176 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html 177note: `Opt` defined here 178 --> $DIR/non-exhaustive-defined-here.rs:81:6 179 | 180LL | enum Opt { 181 | ^^^ 182... 183LL | None, 184 | ---- not covered 185 = note: the matched value is of type `Opt` 186help: you might want to use `let else` to handle the variant that isn't matched 187 | 188LL | let Opt::Some(ref _x) = e else { todo!() }; 189 | ++++++++++++++++ 190 191error: aborting due to 8 previous errors 192 193Some errors have detailed explanations: E0004, E0005. 194For more information about an error, try `rustc --explain E0004`.