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