From 7d142c1e53165fea78314117f59e13257d7bf85d Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Fri, 6 Jul 2018 23:18:38 +0300 Subject: Address comments --- src/libsyntax/parse/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 8bd4a7d71d7..62bb5fbd04f 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -6999,7 +6999,7 @@ impl<'a> Parser<'a> { // Verify whether we have encountered a struct or method definition where the user forgot to // add the `struct` or `fn` keyword after writing `pub`: `pub S {}` - if visibility.node.is_public() && + if visibility.node.is_pub() && self.check_ident() && self.look_ahead(1, |t| *t != token::Not) { -- cgit 1.4.1-3-g733a5