about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-05-17 07:53:49 -0700
committerbors <bors@rust-lang.org>2016-05-17 07:53:49 -0700
commit30422de32d905dca54e503ec7990c4d7d11334da (patch)
tree56f157a2bd8ab1fb933973354d7b539e65c28781
parent5d12502d3a54aaad5e1af48111ecc81a1c2cbf2b (diff)
parent6e1154dc9d1ea73be905845e7fd34d80ad58e0cb (diff)
downloadrust-30422de32d905dca54e503ec7990c4d7d11334da.tar.gz
rust-30422de32d905dca54e503ec7990c4d7d11334da.zip
Auto merge of #33682 - GuillaumeGomez:fix-error-explanation-enum, r=sanxiyn
Fix invalid enum declaration

r? @steveklabnik
cc @Ms2ger
-rw-r--r--src/librustc_typeck/diagnostics.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index af21c7148ef..5f2997a86a9 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -45,16 +45,16 @@ Matching with the wrong number of fields has no sensible interpretation:
 
 ```compile_fail
 enum Fruit {
-    Fruit::Apple(String, String),
-    Fruit::Pear(u32),
+    Apple(String, String),
+    Pear(u32),
 }
 
 let x = Fruit::Apple(String::new(), String::new());
 
 // Incorrect.
 match x {
-    Apple(a) => {},
-    Apple(a, b, c) => {},
+    Fruit::Apple(a) => {},
+    Fruit::Apple(a, b, c) => {},
 }
 ```