about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-07-06 23:18:38 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-07-14 14:57:15 +0300
commit7d142c1e53165fea78314117f59e13257d7bf85d (patch)
treeddf1e5cb7e270398948f246c60bc6832b2920320 /src/libsyntax/parse/parser.rs
parente3acb341b2ff743e186c032326d24bfa8827bedc (diff)
downloadrust-7d142c1e53165fea78314117f59e13257d7bf85d.tar.gz
rust-7d142c1e53165fea78314117f59e13257d7bf85d.zip
Address comments
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
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)
         {