about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-02-23 00:54:30 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-02-23 00:54:30 +0300
commit98eb4ddbceb5bed5e83a9b5e91c173b190532333 (patch)
treed1a2e6456b3594daed116e1f625c9fc01cef2f5b /src/libsyntax/parse
parentb1f8e6fb06d7362eeb2065347a7db94e76b1cb2f (diff)
downloadrust-98eb4ddbceb5bed5e83a9b5e91c173b190532333.tar.gz
rust-98eb4ddbceb5bed5e83a9b5e91c173b190532333.zip
Fix parsing of extern paths in types and poly-traits
Diffstat (limited to 'src/libsyntax/parse')
-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 7915109ce3a..058d6ab0762 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1321,7 +1321,7 @@ impl<'a> Parser<'a> {
     pub fn token_is_bare_fn_keyword(&mut self) -> bool {
         self.check_keyword(keywords::Fn) ||
             self.check_keyword(keywords::Unsafe) ||
-            self.check_keyword(keywords::Extern)
+            self.check_keyword(keywords::Extern) && self.is_extern_non_path()
     }
 
     fn eat_label(&mut self) -> Option<Label> {