From c82e9e8e1e634250b901b69808f65fbe5f3312c3 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Tue, 21 Nov 2017 08:03:02 -0800 Subject: Do not attemt to continue parsing after `pub ident` Try to identify the following code in order to provide better diagnostics, but return the error to bail out early during the parse. --- src/libsyntax/ast.rs | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/libsyntax/ast.rs') diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index a09cfbec879..ad9d5865120 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1977,7 +1977,6 @@ pub enum ItemKind { /// A macro definition. MacroDef(MacroDef), - Placeholder, } impl ItemKind { @@ -1999,7 +1998,6 @@ impl ItemKind { ItemKind::Mac(..) | ItemKind::MacroDef(..) | ItemKind::Impl(..) | - ItemKind::Placeholder | ItemKind::AutoImpl(..) => "item" } } -- cgit 1.4.1-3-g733a5