|
| 1 | +error[E0004]: non-exhaustive patterns: `_` not covered |
| 2 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:8:11 |
| 3 | + | |
| 4 | +LL | match 0 { |
| 5 | + | ^ pattern `_` not covered |
| 6 | + | |
| 7 | + = note: the matched value is of type `usize` |
| 8 | + = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively |
| 9 | + = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching |
| 10 | +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
| 11 | + | |
| 12 | +LL ~ 1..=usize::MAX => (), |
| 13 | +LL ~ _ => todo!(), |
| 14 | + | |
| 15 | + |
| 16 | +error[E0004]: non-exhaustive patterns: `(_, _)` not covered |
| 17 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:14:11 |
| 18 | + | |
| 19 | +LL | match (0usize, 0usize) { |
| 20 | + | ^^^^^^^^^^^^^^^^ pattern `(_, _)` not covered |
| 21 | + | |
| 22 | + = note: the matched value is of type `(usize, usize)` |
| 23 | + = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively |
| 24 | + = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching |
| 25 | +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
| 26 | + | |
| 27 | +LL ~ (1..=usize::MAX, 1..=usize::MAX) => (), |
| 28 | +LL ~ (_, _) => todo!(), |
| 29 | + | |
| 30 | + |
| 31 | +error[E0004]: non-exhaustive patterns: `(_, _)` not covered |
| 32 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:20:11 |
| 33 | + | |
| 34 | +LL | match (0isize, 0usize) { |
| 35 | + | ^^^^^^^^^^^^^^^^ pattern `(_, _)` not covered |
| 36 | + | |
| 37 | + = note: the matched value is of type `(isize, usize)` |
| 38 | + = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively |
| 39 | + = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching |
| 40 | +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
| 41 | + | |
| 42 | +LL ~ (isize::MIN..=isize::MAX, 1..=usize::MAX) => (), |
| 43 | +LL ~ (_, _) => todo!(), |
| 44 | + | |
| 45 | + |
| 46 | +error[E0004]: non-exhaustive patterns: `Some(_)` not covered |
| 47 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:27:11 |
| 48 | + | |
| 49 | +LL | match Some(1usize) { |
| 50 | + | ^^^^^^^^^^^^ pattern `Some(_)` not covered |
| 51 | + | |
| 52 | +note: `Option<usize>` defined here |
| 53 | + --> $SRC_DIR/core/src/option.rs:LL:COL |
| 54 | + ::: $SRC_DIR/core/src/option.rs:LL:COL |
| 55 | + | |
| 56 | + = note: not covered |
| 57 | + = note: the matched value is of type `Option<usize>` |
| 58 | +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
| 59 | + | |
| 60 | +LL ~ None => {}, |
| 61 | +LL + Some(_) => todo!() |
| 62 | + | |
| 63 | + |
| 64 | +error[E0004]: non-exhaustive patterns: `Some(_)` not covered |
| 65 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:32:11 |
| 66 | + | |
| 67 | +LL | match Some(4) { |
| 68 | + | ^^^^^^^ pattern `Some(_)` not covered |
| 69 | + | |
| 70 | +note: `Option<usize>` defined here |
| 71 | + --> $SRC_DIR/core/src/option.rs:LL:COL |
| 72 | + ::: $SRC_DIR/core/src/option.rs:LL:COL |
| 73 | + | |
| 74 | + = note: not covered |
| 75 | + = note: the matched value is of type `Option<usize>` |
| 76 | + = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively |
| 77 | + = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching |
| 78 | +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
| 79 | + | |
| 80 | +LL ~ None => (), |
| 81 | +LL ~ Some(_) => todo!(), |
| 82 | + | |
| 83 | + |
| 84 | +error[E0004]: non-exhaustive patterns: `Some(Some(Some(_)))` not covered |
| 85 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:39:11 |
| 86 | + | |
| 87 | +LL | match Some(Some(Some(0))) { |
| 88 | + | ^^^^^^^^^^^^^^^^^^^ pattern `Some(Some(Some(_)))` not covered |
| 89 | + | |
| 90 | +note: `Option<Option<Option<usize>>>` defined here |
| 91 | + --> $SRC_DIR/core/src/option.rs:LL:COL |
| 92 | + ::: $SRC_DIR/core/src/option.rs:LL:COL |
| 93 | + | |
| 94 | + = note: not covered |
| 95 | + | |
| 96 | + = note: not covered |
| 97 | + | |
| 98 | + = note: not covered |
| 99 | + = note: the matched value is of type `Option<Option<Option<usize>>>` |
| 100 | + = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively |
| 101 | + = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching |
| 102 | +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
| 103 | + | |
| 104 | +LL ~ None => (), |
| 105 | +LL ~ Some(Some(Some(_))) => todo!(), |
| 106 | + | |
| 107 | + |
| 108 | +error[E0004]: non-exhaustive patterns: `A { .. }` not covered |
| 109 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:48:11 |
| 110 | + | |
| 111 | +LL | match (A { a: 0usize }) { |
| 112 | + | ^^^^^^^^^^^^^^^^^ pattern `A { .. }` not covered |
| 113 | + | |
| 114 | +note: `A<usize>` defined here |
| 115 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:1:8 |
| 116 | + | |
| 117 | +LL | struct A<T> { |
| 118 | + | ^ |
| 119 | + = note: the matched value is of type `A<usize>` |
| 120 | + = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively |
| 121 | + = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching |
| 122 | +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
| 123 | + | |
| 124 | +LL ~ A { a: 1..=usize::MAX } => (), |
| 125 | +LL ~ A { .. } => todo!(), |
| 126 | + | |
| 127 | + |
| 128 | +error[E0004]: non-exhaustive patterns: `B(_, _)` not covered |
| 129 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:54:11 |
| 130 | + | |
| 131 | +LL | match B(0isize, 0usize) { |
| 132 | + | ^^^^^^^^^^^^^^^^^ pattern `B(_, _)` not covered |
| 133 | + | |
| 134 | +note: `B<isize, usize>` defined here |
| 135 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:5:8 |
| 136 | + | |
| 137 | +LL | struct B<T, U>(T, U); |
| 138 | + | ^ |
| 139 | + = note: the matched value is of type `B<isize, usize>` |
| 140 | + = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively |
| 141 | + = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching |
| 142 | +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
| 143 | + | |
| 144 | +LL ~ B(isize::MIN..=isize::MAX, 1..=usize::MAX) => (), |
| 145 | +LL ~ B(_, _) => todo!(), |
| 146 | + | |
| 147 | + |
| 148 | +error[E0004]: non-exhaustive patterns: `B(_, _)` not covered |
| 149 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:62:11 |
| 150 | + | |
| 151 | +LL | match B(0isize, 0usize) { |
| 152 | + | ^^^^^^^^^^^^^^^^^ pattern `B(_, _)` not covered |
| 153 | + | |
| 154 | +note: `B<isize, usize>` defined here |
| 155 | + --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:5:8 |
| 156 | + | |
| 157 | +LL | struct B<T, U>(T, U); |
| 158 | + | ^ |
| 159 | + = note: the matched value is of type `B<isize, usize>` |
| 160 | + = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively |
| 161 | + = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching |
| 162 | +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
| 163 | + | |
| 164 | +LL ~ B(_, 1..=usize::MAX) => (), |
| 165 | +LL ~ B(_, _) => todo!(), |
| 166 | + | |
| 167 | + |
| 168 | +error: aborting due to 9 previous errors |
| 169 | + |
| 170 | +For more information about this error, try `rustc --explain E0004`. |
0 commit comments