@@ -23,7 +23,7 @@ pub(crate) enum MetaVarExpr {
2323
2424 /// The length of the repetition at a particular depth, where 0 is the inner-most
2525 /// repetition. The `usize` is the depth.
26- Length ( usize ) ,
26+ Len ( usize ) ,
2727}
2828
2929impl MetaVarExpr {
@@ -48,13 +48,13 @@ impl MetaVarExpr {
4848 MetaVarExpr :: Ignore ( parse_ident ( & mut iter, psess, ident. span ) ?)
4949 }
5050 "index" => MetaVarExpr :: Index ( parse_depth ( & mut iter, psess, ident. span ) ?) ,
51- "length " => MetaVarExpr :: Length ( parse_depth ( & mut iter, psess, ident. span ) ?) ,
51+ "len " => MetaVarExpr :: Len ( parse_depth ( & mut iter, psess, ident. span ) ?) ,
5252 _ => {
5353 let err_msg = "unrecognized meta-variable expression" ;
5454 let mut err = psess. dcx . struct_span_err ( ident. span , err_msg) ;
5555 err. span_suggestion (
5656 ident. span ,
57- "supported expressions are count, ignore, index and length " ,
57+ "supported expressions are count, ignore, index and len " ,
5858 "" ,
5959 Applicability :: MachineApplicable ,
6060 ) ;
@@ -68,7 +68,7 @@ impl MetaVarExpr {
6868 pub ( crate ) fn ident ( & self ) -> Option < Ident > {
6969 match * self {
7070 MetaVarExpr :: Count ( ident, _) | MetaVarExpr :: Ignore ( ident) => Some ( ident) ,
71- MetaVarExpr :: Index ( ..) | MetaVarExpr :: Length ( ..) => None ,
71+ MetaVarExpr :: Index ( ..) | MetaVarExpr :: Len ( ..) => None ,
7272 }
7373 }
7474}
@@ -111,7 +111,7 @@ fn parse_count<'psess>(
111111 Ok ( MetaVarExpr :: Count ( ident, depth) )
112112}
113113
114- /// Parses the depth used by index(depth) and length (depth).
114+ /// Parses the depth used by index(depth) and len (depth).
115115fn parse_depth < ' psess > (
116116 iter : & mut RefTokenTreeCursor < ' _ > ,
117117 psess : & ' psess ParseSess ,
0 commit comments