@@ -11,7 +11,7 @@ mod stmt;
11
11
mod generics;
12
12
13
13
use crate :: ast:: { self , AttrStyle , Attribute , Arg , BindingMode , StrStyle , SelfKind } ;
14
- use crate :: ast:: { FnDecl , Ident , IsAsync , Lifetime , MacDelimiter , Mutability , TyKind } ;
14
+ use crate :: ast:: { FnDecl , Ident , IsAsync , MacDelimiter , Mutability , TyKind } ;
15
15
use crate :: ast:: { Visibility , VisibilityKind , Unsafety , CrateSugar } ;
16
16
use crate :: ext:: hygiene:: SyntaxContext ;
17
17
use crate :: source_map:: { self , respan} ;
@@ -1046,22 +1046,6 @@ impl<'a> Parser<'a> {
1046
1046
Ok ( Arg { attrs : attrs. into ( ) , id : ast:: DUMMY_NODE_ID , pat, span, ty } )
1047
1047
}
1048
1048
1049
- crate fn check_lifetime ( & mut self ) -> bool {
1050
- self . expected_tokens . push ( TokenType :: Lifetime ) ;
1051
- self . token . is_lifetime ( )
1052
- }
1053
-
1054
- /// Parses a single lifetime `'a` or panics.
1055
- crate fn expect_lifetime ( & mut self ) -> Lifetime {
1056
- if let Some ( ident) = self . token . lifetime ( ) {
1057
- let span = self . token . span ;
1058
- self . bump ( ) ;
1059
- Lifetime { ident : Ident :: new ( ident. name , span) , id : ast:: DUMMY_NODE_ID }
1060
- } else {
1061
- self . span_bug ( self . token . span , "not a lifetime" )
1062
- }
1063
- }
1064
-
1065
1049
/// Parses mutability (`mut` or nothing).
1066
1050
fn parse_mutability ( & mut self ) -> Mutability {
1067
1051
if self . eat_keyword ( kw:: Mut ) {
0 commit comments