summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0001.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/error-codes/E0001.rs')
-rw-r--r--tests/ui/error-codes/E0001.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0001.rs b/tests/ui/error-codes/E0001.rs
new file mode 100644
index 000000000..2c95f02bf
--- /dev/null
+++ b/tests/ui/error-codes/E0001.rs
@@ -0,0 +1,10 @@
+#![deny(unreachable_patterns)]
+
+fn main() {
+ let foo = Some(1);
+ match foo {
+ Some(_) => {/* ... */}
+ None => {/* ... */}
+ _ => {/* ... */} //~ ERROR unreachable pattern
+ }
+}