summaryrefslogtreecommitdiffstats
path: root/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr')
-rw-r--r--src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr133
1 files changed, 0 insertions, 133 deletions
diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr
deleted file mode 100644
index c78829634..000000000
--- a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr
+++ /dev/null
@@ -1,133 +0,0 @@
-error[E0004]: non-exhaustive patterns: `Err(_)` not covered
- --> $DIR/uninhabited-matches-feature-gated.rs:6:19
- |
-LL | let _ = match x {
- | ^ pattern `Err(_)` not covered
- |
-note: `Result<u32, &Void>` defined here
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ---------------------
-...
-LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
- | ^^^ not covered
- = note: the matched value is of type `Result<u32, &Void>`
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
- |
-LL ~ Ok(n) => n,
-LL ~ Err(_) => todo!(),
- |
-
-error[E0004]: non-exhaustive patterns: type `&Void` is non-empty
- --> $DIR/uninhabited-matches-feature-gated.rs:15:19
- |
-LL | let _ = match x {};
- | ^
- |
-note: `Void` defined here
- --> $DIR/uninhabited-matches-feature-gated.rs:2:6
- |
-LL | enum Void {}
- | ^^^^
- = note: the matched value is of type `&Void`
- = note: references are always considered inhabited
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
- |
-LL ~ let _ = match x {
-LL + _ => todo!(),
-LL ~ };
- |
-
-error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty
- --> $DIR/uninhabited-matches-feature-gated.rs:18:19
- |
-LL | let _ = match x {};
- | ^
- |
- = note: the matched value is of type `(Void,)`
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
- |
-LL ~ let _ = match x {
-LL + _ => todo!(),
-LL ~ };
- |
-
-error[E0004]: non-exhaustive patterns: type `[Void; 1]` is non-empty
- --> $DIR/uninhabited-matches-feature-gated.rs:21:19
- |
-LL | let _ = match x {};
- | ^
- |
- = note: the matched value is of type `[Void; 1]`
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
- |
-LL ~ let _ = match x {
-LL + _ => todo!(),
-LL ~ };
- |
-
-error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered
- --> $DIR/uninhabited-matches-feature-gated.rs:24:19
- |
-LL | let _ = match x {
- | ^ pattern `&[_, ..]` not covered
- |
- = note: the matched value is of type `&[Void]`
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
- |
-LL ~ &[] => (),
-LL ~ &[_, ..] => todo!(),
- |
-
-error[E0004]: non-exhaustive patterns: `Err(_)` not covered
- --> $DIR/uninhabited-matches-feature-gated.rs:32:19
- |
-LL | let _ = match x {
- | ^ pattern `Err(_)` not covered
- |
-note: `Result<u32, Void>` defined here
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ---------------------
-...
-LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
- | ^^^ not covered
- = note: the matched value is of type `Result<u32, Void>`
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
- |
-LL ~ Ok(x) => x,
-LL ~ Err(_) => todo!(),
- |
-
-error[E0005]: refutable pattern in local binding: `Err(_)` not covered
- --> $DIR/uninhabited-matches-feature-gated.rs:37:9
- |
-LL | let Ok(x) = x;
- | ^^^^^ pattern `Err(_)` not covered
- |
- = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
- = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
-note: `Result<u32, Void>` defined here
- --> $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | pub enum Result<T, E> {
- | ---------------------
-...
-LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
- | ^^^ not covered
- = note: the matched value is of type `Result<u32, Void>`
-help: you might want to use `if let` to ignore the variant that isn't matched
- |
-LL | let x = if let Ok(x) = x { x } else { todo!() };
- | ++++++++++ ++++++++++++++++++++++
-help: alternatively, you might want to use let else to handle the variant that isn't matched
- |
-LL | let Ok(x) = x else { todo!() };
- | ++++++++++++++++
-
-error: aborting due to 7 previous errors
-
-Some errors have detailed explanations: E0004, E0005.
-For more information about an error, try `rustc --explain E0004`.