From 6e1154dc9d1ea73be905845e7fd34d80ad58e0cb Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 17 May 2016 13:15:46 +0200 Subject: [PATCH] Fix invalid enum declaration --- src/librustc_typeck/diagnostics.rs | 8 ++++---- 1 file 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) => {}, } ```