diff --git a/compiler/rustc_ast/src/token.rs b/compiler/rustc_ast/src/token.rs index 20079dd039f6f..2e2aadfaae08b 100644 --- a/compiler/rustc_ast/src/token.rs +++ b/compiler/rustc_ast/src/token.rs @@ -101,8 +101,8 @@ impl fmt::Display for MetaVarKind { MetaVarKind::Item => sym::item, MetaVarKind::Block => sym::block, MetaVarKind::Stmt => sym::stmt, - MetaVarKind::Pat(PatParam { inferred: true } | PatWithOr) => sym::pat, - MetaVarKind::Pat(PatParam { inferred: false }) => sym::pat_param, + MetaVarKind::Pat(Pat2018 | PatWithOr) => sym::pat, + MetaVarKind::Pat(PatParam) => sym::pat_param, MetaVarKind::Expr { kind: Expr2021 { inferred: true } | Expr, .. } => sym::expr, MetaVarKind::Expr { kind: Expr2021 { inferred: false }, .. } => sym::expr_2021, MetaVarKind::Ty { .. } => sym::ty, @@ -1119,10 +1119,10 @@ pub fn ident_of_kind_is_reserved(id: sp::Ident, kind: IdentKind) -> bool { pub enum NtPatKind { // Matches or-patterns. Was written using `pat` in edition 2021 or later. PatWithOr, - // Doesn't match or-patterns. - // - `inferred`: was written using `pat` in edition 2015 or 2018. - // - `!inferred`: was written using `pat_param`. - PatParam { inferred: bool }, + // Doesn't match or-patterns. Was written using `pat_param`. + PatParam, + // Doesn't match or-patterns. Was written using `pat` in edition 2015 or 2018. + Pat2018, } #[derive(Debug, Copy, Clone, PartialEq, Eq, Encodable, Decodable, Hash, StableHash)] @@ -1170,10 +1170,10 @@ impl NonterminalKind { if edition().at_least_rust_2021() { NonterminalKind::Pat(PatWithOr) } else { - NonterminalKind::Pat(PatParam { inferred: true }) + NonterminalKind::Pat(Pat2018) } } - sym::pat_param => NonterminalKind::Pat(PatParam { inferred: false }), + sym::pat_param => NonterminalKind::Pat(PatParam), sym::expr => { if edition().at_least_rust_2024() { NonterminalKind::Expr(Expr) @@ -1200,8 +1200,8 @@ impl NonterminalKind { NonterminalKind::Item => sym::item, NonterminalKind::Block => sym::block, NonterminalKind::Stmt => sym::stmt, - NonterminalKind::Pat(PatParam { inferred: true } | PatWithOr) => sym::pat, - NonterminalKind::Pat(PatParam { inferred: false }) => sym::pat_param, + NonterminalKind::Pat(Pat2018 | PatWithOr) => sym::pat, + NonterminalKind::Pat(PatParam) => sym::pat_param, NonterminalKind::Expr(Expr2021 { inferred: true } | Expr) => sym::expr, NonterminalKind::Expr(Expr2021 { inferred: false }) => sym::expr_2021, NonterminalKind::Ty => sym::ty, diff --git a/compiler/rustc_expand/src/mbe/macro_rules.rs b/compiler/rustc_expand/src/mbe/macro_rules.rs index 12f308fc546c3..19db4d4082492 100644 --- a/compiler/rustc_expand/src/mbe/macro_rules.rs +++ b/compiler/rustc_expand/src/mbe/macro_rules.rs @@ -1583,7 +1583,7 @@ fn check_matcher_core<'tt>( // the macro when compiling another crate that is using the // macro. (See #86567.) if is_defined_in_current_crate(node_id) - && matches!(kind, NonterminalKind::Pat(PatParam { inferred: true })) + && matches!(kind, NonterminalKind::Pat(Pat2018)) && matches!( next_token, TokenTree::Token(token) if *token == token::Or @@ -1593,7 +1593,7 @@ fn check_matcher_core<'tt>( let suggestion = quoted_tt_to_string(&TokenTree::MetaVarDecl { span, name, - kind: NonterminalKind::Pat(PatParam { inferred: false }), + kind: NonterminalKind::Pat(PatParam), }); sess.psess.buffer_lint( RUST_2021_INCOMPATIBLE_OR_PATTERNS, @@ -1629,11 +1629,13 @@ fn check_matcher_core<'tt>( if kind == NonterminalKind::Pat(PatWithOr) && sess.psess.edition.at_least_rust_2021() && next_token.is_token(&token::Or) + || matches!(kind, NonterminalKind::Pat(PatWithOr | Pat2018)) + && next_token.is_token(&token::Colon) { let suggestion = quoted_tt_to_string(&TokenTree::MetaVarDecl { span, name, - kind: NonterminalKind::Pat(PatParam { inferred: false }), + kind: NonterminalKind::Pat(PatParam), }); err.span_suggestion( span, @@ -1745,7 +1747,7 @@ fn is_in_follow(tok: &mbe::TokenTree, kind: NonterminalKind) -> IsInFollow { _ => IsInFollow::No(TOKENS), } } - NonterminalKind::Pat(PatParam { .. }) => { + NonterminalKind::Pat(Pat2018) => { const TOKENS: &[&str] = &["`=>`", "`,`", "`=`", "`|`", "`if`", "`if let`", "`in`"]; match tok { TokenTree::Token(token) => match token.kind { @@ -1759,6 +1761,21 @@ fn is_in_follow(tok: &mbe::TokenTree, kind: NonterminalKind) -> IsInFollow { _ => IsInFollow::No(TOKENS), } } + NonterminalKind::Pat(PatParam) => { + const TOKENS: &[&str] = + &["`=>`", "`,`", "`=`", "`|`", "`:`", "`if`", "`if let`", "`in`"]; + match tok { + TokenTree::Token(token) => match token.kind { + FatArrow | Comma | Eq | Or | Colon => IsInFollow::Yes, + Ident(kw::If | kw::In, IdentKind::Normal | IdentKind::ForcedKeyword) => { + IsInFollow::Yes + } + _ => IsInFollow::No(TOKENS), + }, + TokenTree::MetaVarDecl { kind: NonterminalKind::Guard, .. } => IsInFollow::Yes, + _ => IsInFollow::No(TOKENS), + } + } NonterminalKind::Pat(PatWithOr) => { const TOKENS: &[&str] = &["`=>`", "`,`", "`=`", "`if`", "`if let`", "`in`"]; match tok { diff --git a/compiler/rustc_parse/src/parser/nonterminal.rs b/compiler/rustc_parse/src/parser/nonterminal.rs index 43227edb4df52..7dddfec0fa59e 100644 --- a/compiler/rustc_parse/src/parser/nonterminal.rs +++ b/compiler/rustc_parse/src/parser/nonterminal.rs @@ -148,7 +148,7 @@ impl<'a> Parser<'a> { NonterminalKind::Pat(pat_kind) => Ok(ParseNtResult::Pat( self.collect_tokens_no_attrs(|this| { match pat_kind { - PatParam { .. } => this.parse_pat_no_top_alt(None, None), + PatParam | Pat2018 => this.parse_pat_no_top_alt(None, None), PatWithOr => this.parse_pat_no_top_guard( None, RecoverComma::No, diff --git a/compiler/rustc_parse/src/parser/pat.rs b/compiler/rustc_parse/src/parser/pat.rs index f53cfc792bd69..5908d20b68a66 100644 --- a/compiler/rustc_parse/src/parser/pat.rs +++ b/compiler/rustc_parse/src/parser/pat.rs @@ -698,7 +698,7 @@ impl<'a> Parser<'a> { fn eat_metavar_pat(&mut self) -> Option { // Must try both kinds of pattern nonterminals. if let Some(pat) = self.eat_metavar_seq_with_matcher( - |mv_kind| matches!(mv_kind, MetaVarKind::Pat(PatParam { .. })), + |mv_kind| matches!(mv_kind, MetaVarKind::Pat(PatParam | Pat2018)), |this| this.parse_pat_no_top_alt(None, None), ) { Some(pat) @@ -733,9 +733,7 @@ impl<'a> Parser<'a> { let mut lo = self.token.span; if self.token.is_keyword(kw::Let) - && self.look_ahead(1, |tok| { - tok.can_begin_pattern(token::NtPatKind::PatParam { inferred: false }) - }) + && self.look_ahead(1, |tok| tok.can_begin_pattern(PatParam)) { self.bump(); // Trim extra space after the `let` diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 99bf592c859fb..fc860ab1018d7 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -388,9 +388,7 @@ impl<'a> Parser<'a> { && prev_token_before_parsing == token::PathSep && (style == PathStyle::Expr && self.token.can_begin_expr() || style == PathStyle::Pat - && self.token.can_begin_pattern(token::NtPatKind::PatParam { - inferred: false, - })) + && self.token.can_begin_pattern(token::NtPatKind::PatParam)) { snapshot = Some(self.create_snapshot_for_diagnostic()); } diff --git a/src/tools/rustfmt/src/parse/macros/mod.rs b/src/tools/rustfmt/src/parse/macros/mod.rs index 9afeed3c3ee2a..20bc176e70afd 100644 --- a/src/tools/rustfmt/src/parse/macros/mod.rs +++ b/src/tools/rustfmt/src/parse/macros/mod.rs @@ -61,7 +61,7 @@ fn parse_macro_arg<'a, 'b: 'a>(parser: &'a mut Parser<'b>) -> Option { ); parse_macro_arg!( Pat, - NonterminalKind::Pat(PatParam { inferred: false }), + NonterminalKind::Pat(PatParam), |parser: &mut Parser<'b>| parser.parse_pat_no_top_alt(None, None), |x: ast::Pat| Some(Box::new(x)) ); diff --git a/tests/ui/macros/macro-follow.rs b/tests/ui/macros/macro-follow.rs index cf83a9ad734bd..b3c8c93d949f9 100644 --- a/tests/ui/macros/macro-follow.rs +++ b/tests/ui/macros/macro-follow.rs @@ -27,6 +27,28 @@ macro_rules! follow_pat { ($p:pat $i:item) => {}; //~ERROR `$p:pat` is followed by `$i:item` ($p:pat $m:meta) => {}; //~ERROR `$p:pat` is followed by `$m:meta` } +// FOLLOW(pat_param) = {FOLLOW(pat), Colon[, Or]} +// optional inclusion of `Or` depends on the edition; this is tested separately, +// in `macro-pat-pattern-followed-by-or.rs` / `macro-pat-pattern-followed-by-or-in-2021.rs` +macro_rules! follow_pat { + ($p:pat_param ()) => {}; //~ERROR `$p:pat_param` is followed by `(` + ($p:pat_param []) => {}; //~ERROR `$p:pat_param` is followed by `[` + ($p:pat_param {}) => {}; //~ERROR `$p:pat_param` is followed by `{` + ($p:pat_param :) => {}; // ok + ($p:pat_param >) => {}; //~ERROR `$p:pat_param` is followed by `>` + ($p:pat_param +) => {}; //~ERROR `$p:pat_param` is followed by `+` + ($p:pat_param ident) => {}; //~ERROR `$p:pat_param` is followed by `ident` + ($p:pat_param $q:pat) => {}; //~ERROR `$p:pat_param` is followed by `$q:pat` + ($p:pat_param $e:expr) => {}; //~ERROR `$p:pat_param` is followed by `$e:expr` + ($p:pat_param $t:ty) => {}; //~ERROR `$p:pat_param` is followed by `$t:ty` + ($p:pat_param $s:stmt) => {}; //~ERROR `$p:pat_param` is followed by `$s:stmt` + ($p:pat_param $q:path) => {}; //~ERROR `$p:pat_param` is followed by `$q:path` + ($p:pat_param $b:block) => {}; //~ERROR `$p:pat_param` is followed by `$b:block` + ($p:pat_param $i:ident) => {}; //~ERROR `$p:pat_param` is followed by `$i:ident` + ($p:pat_param $t:tt) => {}; //~ERROR `$p:pat_param` is followed by `$t:tt` + ($p:pat_param $i:item) => {}; //~ERROR `$p:pat_param` is followed by `$i:item` + ($p:pat_param $m:meta) => {}; //~ERROR `$p:pat_param` is followed by `$m:meta` +} // FOLLOW(expr) = {FatArrow, Comma, Semicolon} macro_rules! follow_expr { ($e:expr ()) => {}; //~ERROR `$e:expr` is followed by `(` diff --git a/tests/ui/macros/macro-follow.stderr b/tests/ui/macros/macro-follow.stderr index 64a916b4c227a..cc22ad9c9c27d 100644 --- a/tests/ui/macros/macro-follow.stderr +++ b/tests/ui/macros/macro-follow.stderr @@ -26,7 +26,9 @@ error: `$p:pat` is followed by `:`, which is not allowed for `pat` fragments --> $DIR/macro-follow.rs:15:13 | LL | ($p:pat :) => {}; - | ^ not allowed after `pat` fragments + | ------ ^ not allowed after `pat` fragments + | | + | help: try a `pat_param` fragment specifier instead: `$p:pat_param` | = note: allowed there are: `=>`, `,`, `=`, `|`, `if`, `if let` or `in` @@ -134,8 +136,136 @@ LL | ($p:pat $m:meta) => {}; | = note: allowed there are: `=>`, `,`, `=`, `|`, `if`, `if let` or `in` +error: `$p:pat_param` is followed by `(`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:34:19 + | +LL | ($p:pat_param ()) => {}; + | ^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `[`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:35:19 + | +LL | ($p:pat_param []) => {}; + | ^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `{`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:36:19 + | +LL | ($p:pat_param {}) => {}; + | ^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `>`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:38:19 + | +LL | ($p:pat_param >) => {}; + | ^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `+`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:39:19 + | +LL | ($p:pat_param +) => {}; + | ^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `ident`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:40:19 + | +LL | ($p:pat_param ident) => {}; + | ^^^^^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `$q:pat`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:41:19 + | +LL | ($p:pat_param $q:pat) => {}; + | ^^^^^^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `$e:expr`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:42:19 + | +LL | ($p:pat_param $e:expr) => {}; + | ^^^^^^^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `$t:ty`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:43:19 + | +LL | ($p:pat_param $t:ty) => {}; + | ^^^^^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `$s:stmt`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:44:19 + | +LL | ($p:pat_param $s:stmt) => {}; + | ^^^^^^^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `$q:path`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:45:19 + | +LL | ($p:pat_param $q:path) => {}; + | ^^^^^^^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `$b:block`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:46:19 + | +LL | ($p:pat_param $b:block) => {}; + | ^^^^^^^^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `$i:ident`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:47:19 + | +LL | ($p:pat_param $i:ident) => {}; + | ^^^^^^^^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `$t:tt`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:48:19 + | +LL | ($p:pat_param $t:tt) => {}; + | ^^^^^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `$i:item`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:49:19 + | +LL | ($p:pat_param $i:item) => {}; + | ^^^^^^^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + +error: `$p:pat_param` is followed by `$m:meta`, which is not allowed for `pat_param` fragments + --> $DIR/macro-follow.rs:50:19 + | +LL | ($p:pat_param $m:meta) => {}; + | ^^^^^^^ not allowed after `pat_param` fragments + | + = note: allowed there are: `=>`, `,`, `=`, `|`, `:`, `if`, `if let` or `in` + error: `$e:expr` is followed by `(`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:32:14 + --> $DIR/macro-follow.rs:54:14 | LL | ($e:expr ()) => {}; | ^ not allowed after `expr` fragments @@ -143,7 +273,7 @@ LL | ($e:expr ()) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `[`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:33:14 + --> $DIR/macro-follow.rs:55:14 | LL | ($e:expr []) => {}; | ^ not allowed after `expr` fragments @@ -151,7 +281,7 @@ LL | ($e:expr []) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `{`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:34:14 + --> $DIR/macro-follow.rs:56:14 | LL | ($e:expr {}) => {}; | ^ not allowed after `expr` fragments @@ -159,7 +289,7 @@ LL | ($e:expr {}) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `=`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:35:14 + --> $DIR/macro-follow.rs:57:14 | LL | ($e:expr =) => {}; | ^ not allowed after `expr` fragments @@ -167,7 +297,7 @@ LL | ($e:expr =) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `|`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:36:14 + --> $DIR/macro-follow.rs:58:14 | LL | ($e:expr |) => {}; | ^ not allowed after `expr` fragments @@ -175,7 +305,7 @@ LL | ($e:expr |) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `:`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:37:14 + --> $DIR/macro-follow.rs:59:14 | LL | ($e:expr :) => {}; | ^ not allowed after `expr` fragments @@ -183,7 +313,7 @@ LL | ($e:expr :) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `>`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:38:14 + --> $DIR/macro-follow.rs:60:14 | LL | ($e:expr >) => {}; | ^ not allowed after `expr` fragments @@ -191,7 +321,7 @@ LL | ($e:expr >) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `+`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:39:14 + --> $DIR/macro-follow.rs:61:14 | LL | ($e:expr +) => {}; | ^ not allowed after `expr` fragments @@ -199,7 +329,7 @@ LL | ($e:expr +) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `ident`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:40:14 + --> $DIR/macro-follow.rs:62:14 | LL | ($e:expr ident) => {}; | ^^^^^ not allowed after `expr` fragments @@ -207,7 +337,7 @@ LL | ($e:expr ident) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `if`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:41:14 + --> $DIR/macro-follow.rs:63:14 | LL | ($e:expr if) => {}; | ^^ not allowed after `expr` fragments @@ -215,7 +345,7 @@ LL | ($e:expr if) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `in`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:42:14 + --> $DIR/macro-follow.rs:64:14 | LL | ($e:expr in) => {}; | ^^ not allowed after `expr` fragments @@ -223,7 +353,7 @@ LL | ($e:expr in) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `$p:pat`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:43:14 + --> $DIR/macro-follow.rs:65:14 | LL | ($e:expr $p:pat) => {}; | ^^^^^^ not allowed after `expr` fragments @@ -231,7 +361,7 @@ LL | ($e:expr $p:pat) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `$f:expr`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:44:14 + --> $DIR/macro-follow.rs:66:14 | LL | ($e:expr $f:expr) => {}; | ^^^^^^^ not allowed after `expr` fragments @@ -239,7 +369,7 @@ LL | ($e:expr $f:expr) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `$t:ty`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:45:14 + --> $DIR/macro-follow.rs:67:14 | LL | ($e:expr $t:ty) => {}; | ^^^^^ not allowed after `expr` fragments @@ -247,7 +377,7 @@ LL | ($e:expr $t:ty) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `$s:stmt`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:46:14 + --> $DIR/macro-follow.rs:68:14 | LL | ($e:expr $s:stmt) => {}; | ^^^^^^^ not allowed after `expr` fragments @@ -255,7 +385,7 @@ LL | ($e:expr $s:stmt) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `$p:path`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:47:14 + --> $DIR/macro-follow.rs:69:14 | LL | ($e:expr $p:path) => {}; | ^^^^^^^ not allowed after `expr` fragments @@ -263,7 +393,7 @@ LL | ($e:expr $p:path) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `$b:block`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:48:14 + --> $DIR/macro-follow.rs:70:14 | LL | ($e:expr $b:block) => {}; | ^^^^^^^^ not allowed after `expr` fragments @@ -271,7 +401,7 @@ LL | ($e:expr $b:block) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `$i:ident`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:49:14 + --> $DIR/macro-follow.rs:71:14 | LL | ($e:expr $i:ident) => {}; | ^^^^^^^^ not allowed after `expr` fragments @@ -279,7 +409,7 @@ LL | ($e:expr $i:ident) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `$t:tt`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:50:14 + --> $DIR/macro-follow.rs:72:14 | LL | ($e:expr $t:tt) => {}; | ^^^^^ not allowed after `expr` fragments @@ -287,7 +417,7 @@ LL | ($e:expr $t:tt) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `$i:item`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:51:14 + --> $DIR/macro-follow.rs:73:14 | LL | ($e:expr $i:item) => {}; | ^^^^^^^ not allowed after `expr` fragments @@ -295,7 +425,7 @@ LL | ($e:expr $i:item) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `$m:meta`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:52:14 + --> $DIR/macro-follow.rs:74:14 | LL | ($e:expr $m:meta) => {}; | ^^^^^^^ not allowed after `expr` fragments @@ -303,7 +433,7 @@ LL | ($e:expr $m:meta) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$e:expr` is followed by `$g:guard`, which is not allowed for `expr` fragments - --> $DIR/macro-follow.rs:53:14 + --> $DIR/macro-follow.rs:75:14 | LL | ($e:expr $g:guard) => {}; | ^^^^^^^^ not allowed after `expr` fragments @@ -311,7 +441,7 @@ LL | ($e:expr $g:guard) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$t:ty` is followed by `(`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:58:12 + --> $DIR/macro-follow.rs:80:12 | LL | ($t:ty ()) => {}; | ^ not allowed after `ty` fragments @@ -319,7 +449,7 @@ LL | ($t:ty ()) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `+`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:60:12 + --> $DIR/macro-follow.rs:82:12 | LL | ($t:ty +) => {}; | ^ not allowed after `ty` fragments @@ -327,7 +457,7 @@ LL | ($t:ty +) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `ident`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:61:12 + --> $DIR/macro-follow.rs:83:12 | LL | ($t:ty ident) => {}; | ^^^^^ not allowed after `ty` fragments @@ -335,7 +465,7 @@ LL | ($t:ty ident) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `if`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:62:12 + --> $DIR/macro-follow.rs:84:12 | LL | ($t:ty if) => {}; | ^^ not allowed after `ty` fragments @@ -343,7 +473,7 @@ LL | ($t:ty if) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `$p:pat`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:63:12 + --> $DIR/macro-follow.rs:85:12 | LL | ($t:ty $p:pat) => {}; | ^^^^^^ not allowed after `ty` fragments @@ -351,7 +481,7 @@ LL | ($t:ty $p:pat) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `$e:expr`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:64:12 + --> $DIR/macro-follow.rs:86:12 | LL | ($t:ty $e:expr) => {}; | ^^^^^^^ not allowed after `ty` fragments @@ -359,7 +489,7 @@ LL | ($t:ty $e:expr) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `$r:ty`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:65:12 + --> $DIR/macro-follow.rs:87:12 | LL | ($t:ty $r:ty) => {}; | ^^^^^ not allowed after `ty` fragments @@ -367,7 +497,7 @@ LL | ($t:ty $r:ty) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `$s:stmt`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:66:12 + --> $DIR/macro-follow.rs:88:12 | LL | ($t:ty $s:stmt) => {}; | ^^^^^^^ not allowed after `ty` fragments @@ -375,7 +505,7 @@ LL | ($t:ty $s:stmt) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `$p:path`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:67:12 + --> $DIR/macro-follow.rs:89:12 | LL | ($t:ty $p:path) => {}; | ^^^^^^^ not allowed after `ty` fragments @@ -383,7 +513,7 @@ LL | ($t:ty $p:path) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `$i:ident`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:69:12 + --> $DIR/macro-follow.rs:91:12 | LL | ($t:ty $i:ident) => {}; | ^^^^^^^^ not allowed after `ty` fragments @@ -391,7 +521,7 @@ LL | ($t:ty $i:ident) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `$r:tt`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:70:12 + --> $DIR/macro-follow.rs:92:12 | LL | ($t:ty $r:tt) => {}; | ^^^^^ not allowed after `ty` fragments @@ -399,7 +529,7 @@ LL | ($t:ty $r:tt) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `$i:item`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:71:12 + --> $DIR/macro-follow.rs:93:12 | LL | ($t:ty $i:item) => {}; | ^^^^^^^ not allowed after `ty` fragments @@ -407,7 +537,7 @@ LL | ($t:ty $i:item) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `$m:meta`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:72:12 + --> $DIR/macro-follow.rs:94:12 | LL | ($t:ty $m:meta) => {}; | ^^^^^^^ not allowed after `ty` fragments @@ -415,7 +545,7 @@ LL | ($t:ty $m:meta) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$t:ty` is followed by `$g:guard`, which is not allowed for `ty` fragments - --> $DIR/macro-follow.rs:73:12 + --> $DIR/macro-follow.rs:95:12 | LL | ($t:ty $g:guard) => {}; | ^^^^^^^^ not allowed after `ty` fragments @@ -423,7 +553,7 @@ LL | ($t:ty $g:guard) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$s:stmt` is followed by `(`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:77:14 + --> $DIR/macro-follow.rs:99:14 | LL | ($s:stmt ()) => {}; | ^ not allowed after `stmt` fragments @@ -431,7 +561,7 @@ LL | ($s:stmt ()) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `[`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:78:14 + --> $DIR/macro-follow.rs:100:14 | LL | ($s:stmt []) => {}; | ^ not allowed after `stmt` fragments @@ -439,7 +569,7 @@ LL | ($s:stmt []) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `{`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:79:14 + --> $DIR/macro-follow.rs:101:14 | LL | ($s:stmt {}) => {}; | ^ not allowed after `stmt` fragments @@ -447,7 +577,7 @@ LL | ($s:stmt {}) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `=`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:80:14 + --> $DIR/macro-follow.rs:102:14 | LL | ($s:stmt =) => {}; | ^ not allowed after `stmt` fragments @@ -455,7 +585,7 @@ LL | ($s:stmt =) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `|`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:81:14 + --> $DIR/macro-follow.rs:103:14 | LL | ($s:stmt |) => {}; | ^ not allowed after `stmt` fragments @@ -463,7 +593,7 @@ LL | ($s:stmt |) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `:`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:82:14 + --> $DIR/macro-follow.rs:104:14 | LL | ($s:stmt :) => {}; | ^ not allowed after `stmt` fragments @@ -471,7 +601,7 @@ LL | ($s:stmt :) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `>`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:83:14 + --> $DIR/macro-follow.rs:105:14 | LL | ($s:stmt >) => {}; | ^ not allowed after `stmt` fragments @@ -479,7 +609,7 @@ LL | ($s:stmt >) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `+`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:84:14 + --> $DIR/macro-follow.rs:106:14 | LL | ($s:stmt +) => {}; | ^ not allowed after `stmt` fragments @@ -487,7 +617,7 @@ LL | ($s:stmt +) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `ident`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:85:14 + --> $DIR/macro-follow.rs:107:14 | LL | ($s:stmt ident) => {}; | ^^^^^ not allowed after `stmt` fragments @@ -495,7 +625,7 @@ LL | ($s:stmt ident) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `if`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:86:14 + --> $DIR/macro-follow.rs:108:14 | LL | ($s:stmt if) => {}; | ^^ not allowed after `stmt` fragments @@ -503,7 +633,7 @@ LL | ($s:stmt if) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `in`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:87:14 + --> $DIR/macro-follow.rs:109:14 | LL | ($s:stmt in) => {}; | ^^ not allowed after `stmt` fragments @@ -511,7 +641,7 @@ LL | ($s:stmt in) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `$p:pat`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:88:14 + --> $DIR/macro-follow.rs:110:14 | LL | ($s:stmt $p:pat) => {}; | ^^^^^^ not allowed after `stmt` fragments @@ -519,7 +649,7 @@ LL | ($s:stmt $p:pat) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `$e:expr`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:89:14 + --> $DIR/macro-follow.rs:111:14 | LL | ($s:stmt $e:expr) => {}; | ^^^^^^^ not allowed after `stmt` fragments @@ -527,7 +657,7 @@ LL | ($s:stmt $e:expr) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `$t:ty`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:90:14 + --> $DIR/macro-follow.rs:112:14 | LL | ($s:stmt $t:ty) => {}; | ^^^^^ not allowed after `stmt` fragments @@ -535,7 +665,7 @@ LL | ($s:stmt $t:ty) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `$t:stmt`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:91:14 + --> $DIR/macro-follow.rs:113:14 | LL | ($s:stmt $t:stmt) => {}; | ^^^^^^^ not allowed after `stmt` fragments @@ -543,7 +673,7 @@ LL | ($s:stmt $t:stmt) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `$p:path`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:92:14 + --> $DIR/macro-follow.rs:114:14 | LL | ($s:stmt $p:path) => {}; | ^^^^^^^ not allowed after `stmt` fragments @@ -551,7 +681,7 @@ LL | ($s:stmt $p:path) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `$b:block`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:93:14 + --> $DIR/macro-follow.rs:115:14 | LL | ($s:stmt $b:block) => {}; | ^^^^^^^^ not allowed after `stmt` fragments @@ -559,7 +689,7 @@ LL | ($s:stmt $b:block) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `$i:ident`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:94:14 + --> $DIR/macro-follow.rs:116:14 | LL | ($s:stmt $i:ident) => {}; | ^^^^^^^^ not allowed after `stmt` fragments @@ -567,7 +697,7 @@ LL | ($s:stmt $i:ident) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `$t:tt`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:95:14 + --> $DIR/macro-follow.rs:117:14 | LL | ($s:stmt $t:tt) => {}; | ^^^^^ not allowed after `stmt` fragments @@ -575,7 +705,7 @@ LL | ($s:stmt $t:tt) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `$i:item`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:96:14 + --> $DIR/macro-follow.rs:118:14 | LL | ($s:stmt $i:item) => {}; | ^^^^^^^ not allowed after `stmt` fragments @@ -583,7 +713,7 @@ LL | ($s:stmt $i:item) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `$m:meta`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:97:14 + --> $DIR/macro-follow.rs:119:14 | LL | ($s:stmt $m:meta) => {}; | ^^^^^^^ not allowed after `stmt` fragments @@ -591,7 +721,7 @@ LL | ($s:stmt $m:meta) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$s:stmt` is followed by `$g:guard`, which is not allowed for `stmt` fragments - --> $DIR/macro-follow.rs:98:14 + --> $DIR/macro-follow.rs:120:14 | LL | ($s:stmt $g:guard) => {}; | ^^^^^^^^ not allowed after `stmt` fragments @@ -599,7 +729,7 @@ LL | ($s:stmt $g:guard) => {}; = note: allowed there are: `=>`, `,` or `;` error: `$p:path` is followed by `(`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:102:14 + --> $DIR/macro-follow.rs:124:14 | LL | ($p:path ()) => {}; | ^ not allowed after `path` fragments @@ -607,7 +737,7 @@ LL | ($p:path ()) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `+`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:104:14 + --> $DIR/macro-follow.rs:126:14 | LL | ($p:path +) => {}; | ^ not allowed after `path` fragments @@ -615,7 +745,7 @@ LL | ($p:path +) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `ident`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:105:14 + --> $DIR/macro-follow.rs:127:14 | LL | ($p:path ident) => {}; | ^^^^^ not allowed after `path` fragments @@ -623,7 +753,7 @@ LL | ($p:path ident) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `if`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:106:14 + --> $DIR/macro-follow.rs:128:14 | LL | ($p:path if) => {}; | ^^ not allowed after `path` fragments @@ -631,7 +761,7 @@ LL | ($p:path if) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `$q:pat`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:107:14 + --> $DIR/macro-follow.rs:129:14 | LL | ($p:path $q:pat) => {}; | ^^^^^^ not allowed after `path` fragments @@ -639,7 +769,7 @@ LL | ($p:path $q:pat) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `$e:expr`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:108:14 + --> $DIR/macro-follow.rs:130:14 | LL | ($p:path $e:expr) => {}; | ^^^^^^^ not allowed after `path` fragments @@ -647,7 +777,7 @@ LL | ($p:path $e:expr) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `$t:ty`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:109:14 + --> $DIR/macro-follow.rs:131:14 | LL | ($p:path $t:ty) => {}; | ^^^^^ not allowed after `path` fragments @@ -655,7 +785,7 @@ LL | ($p:path $t:ty) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `$s:stmt`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:110:14 + --> $DIR/macro-follow.rs:132:14 | LL | ($p:path $s:stmt) => {}; | ^^^^^^^ not allowed after `path` fragments @@ -663,7 +793,7 @@ LL | ($p:path $s:stmt) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `$q:path`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:111:14 + --> $DIR/macro-follow.rs:133:14 | LL | ($p:path $q:path) => {}; | ^^^^^^^ not allowed after `path` fragments @@ -671,7 +801,7 @@ LL | ($p:path $q:path) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `$i:ident`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:113:14 + --> $DIR/macro-follow.rs:135:14 | LL | ($p:path $i:ident) => {}; | ^^^^^^^^ not allowed after `path` fragments @@ -679,7 +809,7 @@ LL | ($p:path $i:ident) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `$t:tt`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:114:14 + --> $DIR/macro-follow.rs:136:14 | LL | ($p:path $t:tt) => {}; | ^^^^^ not allowed after `path` fragments @@ -687,7 +817,7 @@ LL | ($p:path $t:tt) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `$i:item`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:115:14 + --> $DIR/macro-follow.rs:137:14 | LL | ($p:path $i:item) => {}; | ^^^^^^^ not allowed after `path` fragments @@ -695,7 +825,7 @@ LL | ($p:path $i:item) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `$m:meta`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:116:14 + --> $DIR/macro-follow.rs:138:14 | LL | ($p:path $m:meta) => {}; | ^^^^^^^ not allowed after `path` fragments @@ -703,12 +833,12 @@ LL | ($p:path $m:meta) => {}; = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` error: `$p:path` is followed by `$g:guard`, which is not allowed for `path` fragments - --> $DIR/macro-follow.rs:117:14 + --> $DIR/macro-follow.rs:139:14 | LL | ($p:path $g:guard) => {}; | ^^^^^^^^ not allowed after `path` fragments | = note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where` -error: aborting due to 89 previous errors +error: aborting due to 105 previous errors