about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-05-04 02:16:59 +0800
committerkennytm <kennytm@gmail.com>2018-05-04 02:16:59 +0800
commitbab812d7ca23a13ae59e80da4eaebaa3c6d63351 (patch)
tree5960f4602afc29c6aa3ec0d6738f3c9cfa534204 /src/libsyntax/parse/parser.rs
parent4cc4a67cea385194ff0fd0d400bba894beceb759 (diff)
parent390c3cee6a8e0c0550eb6213c0e7e5f74c4fbc31 (diff)
downloadrust-bab812d7ca23a13ae59e80da4eaebaa3c6d63351.tar.gz
rust-bab812d7ca23a13ae59e80da4eaebaa3c6d63351.zip
Rollup merge of #50416 - rleungx:non-lifetime, r=estebank
check if the token is a lifetime before parsing

Fixes #50381.
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 324cadc84e8..bbee03bb0d5 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2042,7 +2042,7 @@ impl<'a> Parser<'a> {
         })
     }
 
-    fn check_lifetime(&mut self) -> bool {
+    pub fn check_lifetime(&mut self) -> bool {
         self.expected_tokens.push(TokenType::Lifetime);
         self.token.is_lifetime()
     }