about summary refs log tree commit diff
path: root/tests/ui/uninhabited/uninhabited-unstable-field.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/uninhabited/uninhabited-unstable-field.stderr')
-rw-r--r--tests/ui/uninhabited/uninhabited-unstable-field.stderr40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/ui/uninhabited/uninhabited-unstable-field.stderr b/tests/ui/uninhabited/uninhabited-unstable-field.stderr
new file mode 100644
index 00000000000..a0c9f9366a6
--- /dev/null
+++ b/tests/ui/uninhabited/uninhabited-unstable-field.stderr
@@ -0,0 +1,40 @@
+error: unreachable pattern
+  --> $DIR/uninhabited-unstable-field.rs:24:9
+   |
+LL |         Foo { .. } => {}
+   |         ^^^^^^^^^^------
+   |         |
+   |         matches no values because `Foo<Void>` is uninhabited
+   |         help: remove the match arm
+   |
+   = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
+note: the lint level is defined here
+  --> $DIR/uninhabited-unstable-field.rs:9:9
+   |
+LL | #![deny(unreachable_patterns)]
+   |         ^^^^^^^^^^^^^^^^^^^^
+
+error: unreachable pattern
+  --> $DIR/uninhabited-unstable-field.rs:31:9
+   |
+LL |         _ => {}
+   |         ^------
+   |         |
+   |         matches no values because `Foo<Void>` is uninhabited
+   |         help: remove the match arm
+   |
+   = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
+
+error: unreachable pattern
+  --> $DIR/uninhabited-unstable-field.rs:41:9
+   |
+LL |         MyCoroutineState::Complete(_) => {}
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------
+   |         |
+   |         matches no values because `!` is uninhabited
+   |         help: remove the match arm
+   |
+   = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
+
+error: aborting due to 3 previous errors
+