Auto merge of #55382 - kennytm:rollup, r=kennytm
Rollup of 21 pull requests Successful merges: - #54816 (Don't try to promote already promoted out temporaries) - #54824 (Cleanup rustdoc tests with `@!has` and `@!matches`) - #54921 (Add line numbers option to rustdoc) - #55167 (Add a "cheap" mode for `compute_missing_ctors`.) - #55258 (Fix Rustdoc ICE when checking blanket impls) - #55264 (Compile the libstd we distribute with -Ccodegen-unit=1) - #55271 (Unimplement ExactSizeIterator for MIR traversing iterators) - #55292 (Macro diagnostics tweaks) - #55298 (Point at macro definition when no rules expect token) - #55301 (List allowed tokens after macro fragments) - #55302 (Extend the impl_stable_hash_for! macro for miri.) - #55325 (Fix link to macros chapter) - #55343 (rustbuild: fix remap-debuginfo when building a release) - #55346 (Shrink `Statement`.) - #55358 (Remove redundant clone (2)) - #55370 (Update mailmap for estebank) - #55375 (Typo fixes in configure_cmake comments) - #55378 (rustbuild: use configured linker to build boostrap) - #55379 (validity: assert that unions are non-empty) - #55383 (Use `SmallVec` for the queue in `coerce_unsized`.) - #55391 (bootstrap: clean up a few clippy findings)
This commit is contained in:
commit
3e6f30ec3e
113 changed files with 1170 additions and 497 deletions
17
src/test/ui/consts/const-eval/double_promotion.rs
Normal file
17
src/test/ui/consts/const-eval/double_promotion.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// compile-pass
|
||||
|
||||
#![feature(const_fn, rustc_attrs)]
|
||||
|
||||
#[rustc_args_required_const(0)]
|
||||
pub const fn a(value: u8) -> u8 {
|
||||
value
|
||||
}
|
||||
|
||||
#[rustc_args_required_const(0)]
|
||||
pub fn b(_: u8) {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _ = b(a(0));
|
||||
}
|
||||
|
|
@ -2,13 +2,13 @@ error: no rules expected the token `r#async`
|
|||
--> $DIR/edition-keywords-2015-2015-parsing.rs:22:31
|
||||
|
|
||||
LL | r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ no rules expected the token `r#async`
|
||||
|
||||
error: no rules expected the token `async`
|
||||
--> $DIR/edition-keywords-2015-2015-parsing.rs:23:35
|
||||
|
|
||||
LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
|
||||
| ^^^^^
|
||||
| ^^^^^ no rules expected the token `async`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ error: no rules expected the token `r#async`
|
|||
--> $DIR/edition-keywords-2015-2018-parsing.rs:22:31
|
||||
|
|
||||
LL | r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ no rules expected the token `r#async`
|
||||
|
||||
error: no rules expected the token `async`
|
||||
--> $DIR/edition-keywords-2015-2018-parsing.rs:23:35
|
||||
|
|
||||
LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
|
||||
| ^^^^^
|
||||
| ^^^^^ no rules expected the token `async`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@ error: no rules expected the token `r#async`
|
|||
--> $DIR/edition-keywords-2018-2015-parsing.rs:22:31
|
||||
|
|
||||
LL | r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ no rules expected the token `r#async`
|
||||
|
||||
error: no rules expected the token `async`
|
||||
--> $DIR/edition-keywords-2018-2015-parsing.rs:23:35
|
||||
|
|
||||
LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
|
||||
| ^^^^^
|
||||
| ^^^^^ no rules expected the token `async`
|
||||
|
||||
error: expected one of `move`, `|`, or `||`, found `<eof>`
|
||||
--> <::edition_kw_macro_2015::passes_ident macros>:1:22
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@ error: no rules expected the token `r#async`
|
|||
--> $DIR/edition-keywords-2018-2018-parsing.rs:22:31
|
||||
|
|
||||
LL | r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ no rules expected the token `r#async`
|
||||
|
||||
error: no rules expected the token `async`
|
||||
--> $DIR/edition-keywords-2018-2018-parsing.rs:23:35
|
||||
|
|
||||
LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
|
||||
| ^^^^^
|
||||
| ^^^^^ no rules expected the token `async`
|
||||
|
||||
error: expected one of `move`, `|`, or `||`, found `<eof>`
|
||||
--> <::edition_kw_macro_2018::passes_ident macros>:1:22
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
error: unexpected end of macro invocation
|
||||
--> $DIR/empty-comment.rs:20:5
|
||||
|
|
||||
LL | macro_rules! one_arg_macro {
|
||||
| -------------------------- when calling this macro
|
||||
...
|
||||
LL | one_arg_macro!(/**/); //~ ERROR unexpected end
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ unexpected end of macro invocation
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: no rules expected the token `@`
|
|||
--> $DIR/fail-simple.rs:12:12
|
||||
|
|
||||
LL | panic!(@); //~ ERROR no rules expected the token `@`
|
||||
| ^
|
||||
| ^ no rules expected the token `@`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,11 @@ error: macro expansion ignores token `;` and any following
|
|||
|
|
||||
LL | () => ( String ; ); //~ ERROR macro expansion ignores token `;`
|
||||
| ^
|
||||
|
|
||||
note: caused by the macro expansion here; the usage of `t!` is likely invalid in type context
|
||||
--> $DIR/issue-30007.rs:16:16
|
||||
|
|
||||
...
|
||||
LL | let i: Vec<t!()>;
|
||||
| ^^^^
|
||||
| ---- caused by the macro expansion here
|
||||
|
|
||||
= note: the usage of `t!` is likely invalid in type context
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
error: unexpected end of macro invocation
|
||||
--> $DIR/issue-7970a.rs:16:5
|
||||
|
|
||||
LL | macro_rules! one_arg_macro {
|
||||
| -------------------------- when calling this macro
|
||||
...
|
||||
LL | one_arg_macro!();
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^^^^^^^ unexpected end of macro invocation
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -51,20 +51,29 @@ LL | ($(a)?*) => {}
|
|||
error: no rules expected the token `?`
|
||||
--> $DIR/macro-at-most-once-rep-2018-feature-gate.rs:41:11
|
||||
|
|
||||
LL | macro_rules! foo {
|
||||
| ---------------- when calling this macro
|
||||
...
|
||||
LL | foo!(a?); //~ ERROR no rules expected the token `?`
|
||||
| ^
|
||||
| ^ no rules expected the token `?`
|
||||
|
||||
error: no rules expected the token `?`
|
||||
--> $DIR/macro-at-most-once-rep-2018-feature-gate.rs:42:11
|
||||
|
|
||||
LL | macro_rules! foo {
|
||||
| ---------------- when calling this macro
|
||||
...
|
||||
LL | foo!(a?a); //~ ERROR no rules expected the token `?`
|
||||
| ^
|
||||
| ^ no rules expected the token `?`
|
||||
|
||||
error: no rules expected the token `?`
|
||||
--> $DIR/macro-at-most-once-rep-2018-feature-gate.rs:43:11
|
||||
|
|
||||
LL | macro_rules! foo {
|
||||
| ---------------- when calling this macro
|
||||
...
|
||||
LL | foo!(a?a?a); //~ ERROR no rules expected the token `?`
|
||||
| ^
|
||||
| ^ no rules expected the token `?`
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -7,68 +7,101 @@ LL | ($(a),?) => {} //~ERROR the `?` macro repetition operator
|
|||
error: no rules expected the token `?`
|
||||
--> $DIR/macro-at-most-once-rep-2018.rs:36:11
|
||||
|
|
||||
LL | macro_rules! foo {
|
||||
| ---------------- when calling this macro
|
||||
...
|
||||
LL | foo!(a?); //~ ERROR no rules expected the token `?`
|
||||
| ^
|
||||
| ^ no rules expected the token `?`
|
||||
|
||||
error: no rules expected the token `?`
|
||||
--> $DIR/macro-at-most-once-rep-2018.rs:37:11
|
||||
|
|
||||
LL | macro_rules! foo {
|
||||
| ---------------- when calling this macro
|
||||
...
|
||||
LL | foo!(a?a); //~ ERROR no rules expected the token `?`
|
||||
| ^
|
||||
| ^ no rules expected the token `?`
|
||||
|
||||
error: no rules expected the token `?`
|
||||
--> $DIR/macro-at-most-once-rep-2018.rs:38:11
|
||||
|
|
||||
LL | macro_rules! foo {
|
||||
| ---------------- when calling this macro
|
||||
...
|
||||
LL | foo!(a?a?a); //~ ERROR no rules expected the token `?`
|
||||
| ^
|
||||
| ^ no rules expected the token `?`
|
||||
|
||||
error: unexpected end of macro invocation
|
||||
--> $DIR/macro-at-most-once-rep-2018.rs:40:5
|
||||
|
|
||||
LL | macro_rules! barplus {
|
||||
| -------------------- when calling this macro
|
||||
...
|
||||
LL | barplus!(); //~ERROR unexpected end of macro invocation
|
||||
| ^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^ unexpected end of macro invocation
|
||||
|
||||
error: unexpected end of macro invocation
|
||||
--> $DIR/macro-at-most-once-rep-2018.rs:41:14
|
||||
|
|
||||
LL | macro_rules! barplus {
|
||||
| -------------------- when calling this macro
|
||||
...
|
||||
LL | barplus!(a); //~ERROR unexpected end of macro invocation
|
||||
| ^
|
||||
| ^ unexpected end of macro invocation
|
||||
|
||||
error: no rules expected the token `?`
|
||||
--> $DIR/macro-at-most-once-rep-2018.rs:42:15
|
||||
|
|
||||
LL | macro_rules! barplus {
|
||||
| -------------------- when calling this macro
|
||||
...
|
||||
LL | barplus!(a?); //~ ERROR no rules expected the token `?`
|
||||
| ^
|
||||
| ^ no rules expected the token `?`
|
||||
|
||||
error: no rules expected the token `?`
|
||||
--> $DIR/macro-at-most-once-rep-2018.rs:43:15
|
||||
|
|
||||
LL | macro_rules! barplus {
|
||||
| -------------------- when calling this macro
|
||||
...
|
||||
LL | barplus!(a?a); //~ ERROR no rules expected the token `?`
|
||||
| ^
|
||||
| ^ no rules expected the token `?`
|
||||
|
||||
error: unexpected end of macro invocation
|
||||
--> $DIR/macro-at-most-once-rep-2018.rs:47:5
|
||||
|
|
||||
LL | macro_rules! barstar {
|
||||
| -------------------- when calling this macro
|
||||
...
|
||||
LL | barstar!(); //~ERROR unexpected end of macro invocation
|
||||
| ^^^^^^^^^^^
|
||||
| ^^^^^^^^^^^ unexpected end of macro invocation
|
||||
|
||||
error: unexpected end of macro invocation
|
||||
--> $DIR/macro-at-most-once-rep-2018.rs:48:14
|
||||
|
|
||||
LL | macro_rules! barstar {
|
||||
| -------------------- when calling this macro
|
||||
...
|
||||
LL | barstar!(a); //~ERROR unexpected end of macro invocation
|
||||
| ^
|
||||
| ^ unexpected end of macro invocation
|
||||
|
||||
error: no rules expected the token `?`
|
||||
--> $DIR/macro-at-most-once-rep-2018.rs:49:15
|
||||
|
|
||||
LL | macro_rules! barstar {
|
||||
| -------------------- when calling this macro
|
||||
...
|
||||
LL | barstar!(a?); //~ ERROR no rules expected the token `?`
|
||||
| ^
|
||||
| ^ no rules expected the token `?`
|
||||
|
||||
error: no rules expected the token `?`
|
||||
--> $DIR/macro-at-most-once-rep-2018.rs:50:15
|
||||
|
|
||||
LL | macro_rules! barstar {
|
||||
| -------------------- when calling this macro
|
||||
...
|
||||
LL | barstar!(a?a); //~ ERROR no rules expected the token `?`
|
||||
| ^
|
||||
| ^ no rules expected the token `?`
|
||||
|
||||
error: aborting due to 12 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -3,36 +3,33 @@ error: macro expansion ignores token `;` and any following
|
|||
|
|
||||
LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof`
|
||||
| ^
|
||||
|
|
||||
note: caused by the macro expansion here; the usage of `m!` is likely invalid in type context
|
||||
--> $DIR/macro-context.rs:20:12
|
||||
|
|
||||
...
|
||||
LL | let a: m!();
|
||||
| ^^^^
|
||||
| ---- caused by the macro expansion here
|
||||
|
|
||||
= note: the usage of `m!` is likely invalid in type context
|
||||
|
||||
error: macro expansion ignores token `typeof` and any following
|
||||
--> $DIR/macro-context.rs:13:17
|
||||
|
|
||||
LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof`
|
||||
| ^^^^^^
|
||||
|
|
||||
note: caused by the macro expansion here; the usage of `m!` is likely invalid in expression context
|
||||
--> $DIR/macro-context.rs:21:13
|
||||
|
|
||||
...
|
||||
LL | let i = m!();
|
||||
| ^^^^
|
||||
| ---- caused by the macro expansion here
|
||||
|
|
||||
= note: the usage of `m!` is likely invalid in expression context
|
||||
|
||||
error: macro expansion ignores token `;` and any following
|
||||
--> $DIR/macro-context.rs:13:15
|
||||
|
|
||||
LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof`
|
||||
| ^
|
||||
|
|
||||
note: caused by the macro expansion here; the usage of `m!` is likely invalid in pattern context
|
||||
--> $DIR/macro-context.rs:23:9
|
||||
|
|
||||
...
|
||||
LL | m!() => {}
|
||||
| ^^^^
|
||||
| ---- caused by the macro expansion here
|
||||
|
|
||||
= note: the usage of `m!` is likely invalid in pattern context
|
||||
|
||||
error: expected expression, found reserved keyword `typeof`
|
||||
--> $DIR/macro-context.rs:13:17
|
||||
|
|
|
|||
|
|
@ -2,511 +2,681 @@ error: `$p:pat` is followed by `(`, which is not allowed for `pat` fragments
|
|||
--> $DIR/macro-follow.rs:17:14
|
||||
|
|
||||
LL | ($p:pat ()) => {}; //~ERROR `$p:pat` is followed by `(`
|
||||
| ^
|
||||
| ^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `[`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:18:14
|
||||
|
|
||||
LL | ($p:pat []) => {}; //~ERROR `$p:pat` is followed by `[`
|
||||
| ^
|
||||
| ^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `{`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:19:14
|
||||
|
|
||||
LL | ($p:pat {}) => {}; //~ERROR `$p:pat` is followed by `{`
|
||||
| ^
|
||||
| ^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `:`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:20:13
|
||||
|
|
||||
LL | ($p:pat :) => {}; //~ERROR `$p:pat` is followed by `:`
|
||||
| ^
|
||||
| ^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `>`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:21:13
|
||||
|
|
||||
LL | ($p:pat >) => {}; //~ERROR `$p:pat` is followed by `>`
|
||||
| ^
|
||||
| ^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `+`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:22:13
|
||||
|
|
||||
LL | ($p:pat +) => {}; //~ERROR `$p:pat` is followed by `+`
|
||||
| ^
|
||||
| ^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `ident`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:23:13
|
||||
|
|
||||
LL | ($p:pat ident) => {}; //~ERROR `$p:pat` is followed by `ident`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `$p:pat`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:24:13
|
||||
|
|
||||
LL | ($p:pat $p:pat) => {}; //~ERROR `$p:pat` is followed by `$p:pat`
|
||||
| ^^^^^^
|
||||
| ^^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `$e:expr`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:25:13
|
||||
|
|
||||
LL | ($p:pat $e:expr) => {}; //~ERROR `$p:pat` is followed by `$e:expr`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `$t:ty`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:26:13
|
||||
|
|
||||
LL | ($p:pat $t:ty) => {}; //~ERROR `$p:pat` is followed by `$t:ty`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `$s:stmt`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:27:13
|
||||
|
|
||||
LL | ($p:pat $s:stmt) => {}; //~ERROR `$p:pat` is followed by `$s:stmt`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `$p:path`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:28:13
|
||||
|
|
||||
LL | ($p:pat $p:path) => {}; //~ERROR `$p:pat` is followed by `$p:path`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `$b:block`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:29:13
|
||||
|
|
||||
LL | ($p:pat $b:block) => {}; //~ERROR `$p:pat` is followed by `$b:block`
|
||||
| ^^^^^^^^
|
||||
| ^^^^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `$i:ident`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:30:13
|
||||
|
|
||||
LL | ($p:pat $i:ident) => {}; //~ERROR `$p:pat` is followed by `$i:ident`
|
||||
| ^^^^^^^^
|
||||
| ^^^^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `$t:tt`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:31:13
|
||||
|
|
||||
LL | ($p:pat $t:tt) => {}; //~ERROR `$p:pat` is followed by `$t:tt`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `$i:item`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:32:13
|
||||
|
|
||||
LL | ($p:pat $i:item) => {}; //~ERROR `$p:pat` is followed by `$i:item`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$p:pat` is followed by `$m:meta`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-follow.rs:33:13
|
||||
|
|
||||
LL | ($p:pat $m:meta) => {}; //~ERROR `$p:pat` is followed by `$m:meta`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$e:expr` is followed by `(`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:37:15
|
||||
|
|
||||
LL | ($e:expr ()) => {}; //~ERROR `$e:expr` is followed by `(`
|
||||
| ^
|
||||
| ^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `[`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:38:15
|
||||
|
|
||||
LL | ($e:expr []) => {}; //~ERROR `$e:expr` is followed by `[`
|
||||
| ^
|
||||
| ^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `{`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:39:15
|
||||
|
|
||||
LL | ($e:expr {}) => {}; //~ERROR `$e:expr` is followed by `{`
|
||||
| ^
|
||||
| ^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `=`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:40:14
|
||||
|
|
||||
LL | ($e:expr =) => {}; //~ERROR `$e:expr` is followed by `=`
|
||||
| ^
|
||||
| ^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `|`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:41:14
|
||||
|
|
||||
LL | ($e:expr |) => {}; //~ERROR `$e:expr` is followed by `|`
|
||||
| ^
|
||||
| ^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `:`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:42:14
|
||||
|
|
||||
LL | ($e:expr :) => {}; //~ERROR `$e:expr` is followed by `:`
|
||||
| ^
|
||||
| ^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `>`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:43:14
|
||||
|
|
||||
LL | ($e:expr >) => {}; //~ERROR `$e:expr` is followed by `>`
|
||||
| ^
|
||||
| ^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `+`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:44:14
|
||||
|
|
||||
LL | ($e:expr +) => {}; //~ERROR `$e:expr` is followed by `+`
|
||||
| ^
|
||||
| ^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `ident`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:45:14
|
||||
|
|
||||
LL | ($e:expr ident) => {}; //~ERROR `$e:expr` is followed by `ident`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `if`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:46:14
|
||||
|
|
||||
LL | ($e:expr if) => {}; //~ERROR `$e:expr` is followed by `if`
|
||||
| ^^
|
||||
| ^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `in`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:47:14
|
||||
|
|
||||
LL | ($e:expr in) => {}; //~ERROR `$e:expr` is followed by `in`
|
||||
| ^^
|
||||
| ^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `$p:pat`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:48:14
|
||||
|
|
||||
LL | ($e:expr $p:pat) => {}; //~ERROR `$e:expr` is followed by `$p:pat`
|
||||
| ^^^^^^
|
||||
| ^^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `$e:expr`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:49:14
|
||||
|
|
||||
LL | ($e:expr $e:expr) => {}; //~ERROR `$e:expr` is followed by `$e:expr`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `$t:ty`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:50:14
|
||||
|
|
||||
LL | ($e:expr $t:ty) => {}; //~ERROR `$e:expr` is followed by `$t:ty`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `$s:stmt`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:51:14
|
||||
|
|
||||
LL | ($e:expr $s:stmt) => {}; //~ERROR `$e:expr` is followed by `$s:stmt`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `$p:path`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:52:14
|
||||
|
|
||||
LL | ($e:expr $p:path) => {}; //~ERROR `$e:expr` is followed by `$p:path`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `$b:block`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:53:14
|
||||
|
|
||||
LL | ($e:expr $b:block) => {}; //~ERROR `$e:expr` is followed by `$b:block`
|
||||
| ^^^^^^^^
|
||||
| ^^^^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `$i:ident`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:54:14
|
||||
|
|
||||
LL | ($e:expr $i:ident) => {}; //~ERROR `$e:expr` is followed by `$i:ident`
|
||||
| ^^^^^^^^
|
||||
| ^^^^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `$t:tt`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:55:14
|
||||
|
|
||||
LL | ($e:expr $t:tt) => {}; //~ERROR `$e:expr` is followed by `$t:tt`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `$i:item`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:56:14
|
||||
|
|
||||
LL | ($e:expr $i:item) => {}; //~ERROR `$e:expr` is followed by `$i:item`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$e:expr` is followed by `$m:meta`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-follow.rs:57:14
|
||||
|
|
||||
LL | ($e:expr $m:meta) => {}; //~ERROR `$e:expr` is followed by `$m:meta`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$t:ty` is followed by `(`, which is not allowed for `ty` fragments
|
||||
--> $DIR/macro-follow.rs:62:13
|
||||
|
|
||||
LL | ($t:ty ()) => {}; //~ERROR `$t:ty` is followed by `(`
|
||||
| ^
|
||||
| ^ not allowed after `ty` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$t:ty` is followed by `+`, which is not allowed for `ty` fragments
|
||||
--> $DIR/macro-follow.rs:64:12
|
||||
|
|
||||
LL | ($t:ty +) => {}; //~ERROR `$t:ty` is followed by `+`
|
||||
| ^
|
||||
| ^ not allowed after `ty` fragments
|
||||
|
|
||||
= 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:65:12
|
||||
|
|
||||
LL | ($t:ty ident) => {}; //~ERROR `$t:ty` is followed by `ident`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= 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:66:12
|
||||
|
|
||||
LL | ($t:ty if) => {}; //~ERROR `$t:ty` is followed by `if`
|
||||
| ^^
|
||||
| ^^ not allowed after `ty` fragments
|
||||
|
|
||||
= 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:67:12
|
||||
|
|
||||
LL | ($t:ty $p:pat) => {}; //~ERROR `$t:ty` is followed by `$p:pat`
|
||||
| ^^^^^^
|
||||
| ^^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= 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:68:12
|
||||
|
|
||||
LL | ($t:ty $e:expr) => {}; //~ERROR `$t:ty` is followed by `$e:expr`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$t:ty` is followed by `$t:ty`, which is not allowed for `ty` fragments
|
||||
--> $DIR/macro-follow.rs:69:12
|
||||
|
|
||||
LL | ($t:ty $t:ty) => {}; //~ERROR `$t:ty` is followed by `$t:ty`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= 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:70:12
|
||||
|
|
||||
LL | ($t:ty $s:stmt) => {}; //~ERROR `$t:ty` is followed by `$s:stmt`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= 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:71:12
|
||||
|
|
||||
LL | ($t:ty $p:path) => {}; //~ERROR `$t:ty` is followed by `$p:path`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= 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:73:12
|
||||
|
|
||||
LL | ($t:ty $i:ident) => {}; //~ERROR `$t:ty` is followed by `$i:ident`
|
||||
| ^^^^^^^^
|
||||
| ^^^^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$t:ty` is followed by `$t:tt`, which is not allowed for `ty` fragments
|
||||
--> $DIR/macro-follow.rs:74:12
|
||||
|
|
||||
LL | ($t:ty $t:tt) => {}; //~ERROR `$t:ty` is followed by `$t:tt`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= 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:75:12
|
||||
|
|
||||
LL | ($t:ty $i:item) => {}; //~ERROR `$t:ty` is followed by `$i:item`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= 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:76:12
|
||||
|
|
||||
LL | ($t:ty $m:meta) => {}; //~ERROR `$t:ty` is followed by `$m:meta`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$s:stmt` is followed by `(`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:80:15
|
||||
|
|
||||
LL | ($s:stmt ()) => {}; //~ERROR `$s:stmt` is followed by `(`
|
||||
| ^
|
||||
| ^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `[`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:81:15
|
||||
|
|
||||
LL | ($s:stmt []) => {}; //~ERROR `$s:stmt` is followed by `[`
|
||||
| ^
|
||||
| ^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `{`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:82:15
|
||||
|
|
||||
LL | ($s:stmt {}) => {}; //~ERROR `$s:stmt` is followed by `{`
|
||||
| ^
|
||||
| ^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `=`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:83:14
|
||||
|
|
||||
LL | ($s:stmt =) => {}; //~ERROR `$s:stmt` is followed by `=`
|
||||
| ^
|
||||
| ^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `|`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:84:14
|
||||
|
|
||||
LL | ($s:stmt |) => {}; //~ERROR `$s:stmt` is followed by `|`
|
||||
| ^
|
||||
| ^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `:`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:85:14
|
||||
|
|
||||
LL | ($s:stmt :) => {}; //~ERROR `$s:stmt` is followed by `:`
|
||||
| ^
|
||||
| ^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `>`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:86:14
|
||||
|
|
||||
LL | ($s:stmt >) => {}; //~ERROR `$s:stmt` is followed by `>`
|
||||
| ^
|
||||
| ^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `+`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:87:14
|
||||
|
|
||||
LL | ($s:stmt +) => {}; //~ERROR `$s:stmt` is followed by `+`
|
||||
| ^
|
||||
| ^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `ident`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:88:14
|
||||
|
|
||||
LL | ($s:stmt ident) => {}; //~ERROR `$s:stmt` is followed by `ident`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `if`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:89:14
|
||||
|
|
||||
LL | ($s:stmt if) => {}; //~ERROR `$s:stmt` is followed by `if`
|
||||
| ^^
|
||||
| ^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `in`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:90:14
|
||||
|
|
||||
LL | ($s:stmt in) => {}; //~ERROR `$s:stmt` is followed by `in`
|
||||
| ^^
|
||||
| ^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `$p:pat`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:91:14
|
||||
|
|
||||
LL | ($s:stmt $p:pat) => {}; //~ERROR `$s:stmt` is followed by `$p:pat`
|
||||
| ^^^^^^
|
||||
| ^^^^^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `$e:expr`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:92:14
|
||||
|
|
||||
LL | ($s:stmt $e:expr) => {}; //~ERROR `$s:stmt` is followed by `$e:expr`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `$t:ty`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:93:14
|
||||
|
|
||||
LL | ($s:stmt $t:ty) => {}; //~ERROR `$s:stmt` is followed by `$t:ty`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `$s:stmt`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:94:14
|
||||
|
|
||||
LL | ($s:stmt $s:stmt) => {}; //~ERROR `$s:stmt` is followed by `$s:stmt`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `$p:path`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:95:14
|
||||
|
|
||||
LL | ($s:stmt $p:path) => {}; //~ERROR `$s:stmt` is followed by `$p:path`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `$b:block`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:96:14
|
||||
|
|
||||
LL | ($s:stmt $b:block) => {}; //~ERROR `$s:stmt` is followed by `$b:block`
|
||||
| ^^^^^^^^
|
||||
| ^^^^^^^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `$i:ident`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:97:14
|
||||
|
|
||||
LL | ($s:stmt $i:ident) => {}; //~ERROR `$s:stmt` is followed by `$i:ident`
|
||||
| ^^^^^^^^
|
||||
| ^^^^^^^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `$t:tt`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:98:14
|
||||
|
|
||||
LL | ($s:stmt $t:tt) => {}; //~ERROR `$s:stmt` is followed by `$t:tt`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `$i:item`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:99:14
|
||||
|
|
||||
LL | ($s:stmt $i:item) => {}; //~ERROR `$s:stmt` is followed by `$i:item`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$s:stmt` is followed by `$m:meta`, which is not allowed for `stmt` fragments
|
||||
--> $DIR/macro-follow.rs:100:14
|
||||
|
|
||||
LL | ($s:stmt $m:meta) => {}; //~ERROR `$s:stmt` is followed by `$m:meta`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `stmt` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$p:path` is followed by `(`, which is not allowed for `path` fragments
|
||||
--> $DIR/macro-follow.rs:104:15
|
||||
|
|
||||
LL | ($p:path ()) => {}; //~ERROR `$p:path` is followed by `(`
|
||||
| ^
|
||||
| ^ not allowed after `path` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$p:path` is followed by `+`, which is not allowed for `path` fragments
|
||||
--> $DIR/macro-follow.rs:106:14
|
||||
|
|
||||
LL | ($p:path +) => {}; //~ERROR `$p:path` is followed by `+`
|
||||
| ^
|
||||
| ^ not allowed after `path` fragments
|
||||
|
|
||||
= 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:107:14
|
||||
|
|
||||
LL | ($p:path ident) => {}; //~ERROR `$p:path` is followed by `ident`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `path` fragments
|
||||
|
|
||||
= 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:108:14
|
||||
|
|
||||
LL | ($p:path if) => {}; //~ERROR `$p:path` is followed by `if`
|
||||
| ^^
|
||||
| ^^ not allowed after `path` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$p:path` is followed by `$p:pat`, which is not allowed for `path` fragments
|
||||
--> $DIR/macro-follow.rs:109:14
|
||||
|
|
||||
LL | ($p:path $p:pat) => {}; //~ERROR `$p:path` is followed by `$p:pat`
|
||||
| ^^^^^^
|
||||
| ^^^^^^ not allowed after `path` fragments
|
||||
|
|
||||
= 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:110:14
|
||||
|
|
||||
LL | ($p:path $e:expr) => {}; //~ERROR `$p:path` is followed by `$e:expr`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `path` fragments
|
||||
|
|
||||
= 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:111:14
|
||||
|
|
||||
LL | ($p:path $t:ty) => {}; //~ERROR `$p:path` is followed by `$t:ty`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `path` fragments
|
||||
|
|
||||
= 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:112:14
|
||||
|
|
||||
LL | ($p:path $s:stmt) => {}; //~ERROR `$p:path` is followed by `$s:stmt`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `path` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$p:path` is followed by `$p:path`, which is not allowed for `path` fragments
|
||||
--> $DIR/macro-follow.rs:113:14
|
||||
|
|
||||
LL | ($p:path $p:path) => {}; //~ERROR `$p:path` is followed by `$p:path`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `path` fragments
|
||||
|
|
||||
= 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:115:14
|
||||
|
|
||||
LL | ($p:path $i:ident) => {}; //~ERROR `$p:path` is followed by `$i:ident`
|
||||
| ^^^^^^^^
|
||||
| ^^^^^^^^ not allowed after `path` fragments
|
||||
|
|
||||
= 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:116:14
|
||||
|
|
||||
LL | ($p:path $t:tt) => {}; //~ERROR `$p:path` is followed by `$t:tt`
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `path` fragments
|
||||
|
|
||||
= 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:117:14
|
||||
|
|
||||
LL | ($p:path $i:item) => {}; //~ERROR `$p:path` is followed by `$i:item`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `path` fragments
|
||||
|
|
||||
= 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:118:14
|
||||
|
|
||||
LL | ($p:path $m:meta) => {}; //~ERROR `$p:path` is followed by `$m:meta`
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `path` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: aborting due to 85 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,17 @@ error: `$a:expr` is followed by `$b:tt`, which is not allowed for `expr` fragmen
|
|||
--> $DIR/macro-followed-by-seq-bad.rs:17:15
|
||||
|
|
||||
LL | ( $a:expr $($b:tt)* ) => { }; //~ ERROR not allowed for `expr` fragments
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: `$a:ty` is followed by `$b:tt`, which is not allowed for `ty` fragments
|
||||
--> $DIR/macro-followed-by-seq-bad.rs:18:13
|
||||
|
|
||||
LL | ( $a:ty $($b:tt)* ) => { }; //~ ERROR not allowed for `ty` fragments
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
7
src/test/ui/macros/macro-in-expression-context-2.rs
Normal file
7
src/test/ui/macros/macro-in-expression-context-2.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
macro_rules! empty { () => () }
|
||||
|
||||
fn main() {
|
||||
match 42 {
|
||||
_ => { empty!() }
|
||||
};
|
||||
}
|
||||
8
src/test/ui/macros/macro-in-expression-context-2.stderr
Normal file
8
src/test/ui/macros/macro-in-expression-context-2.stderr
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
error: expected expression, found `<eof>`
|
||||
--> $DIR/macro-in-expression-context-2.rs:5:16
|
||||
|
|
||||
LL | _ => { empty!() }
|
||||
| ^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
15
src/test/ui/macros/macro-in-expression-context.fixed
Normal file
15
src/test/ui/macros/macro-in-expression-context.fixed
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// run-rustfix
|
||||
|
||||
macro_rules! foo {
|
||||
() => {
|
||||
assert_eq!("A", "A");
|
||||
assert_eq!("B", "B");
|
||||
}
|
||||
//~^^ ERROR macro expansion ignores token `assert_eq` and any following
|
||||
//~| NOTE the usage of `foo!` is likely invalid in expression context
|
||||
}
|
||||
|
||||
fn main() {
|
||||
foo!();
|
||||
//~^ NOTE caused by the macro expansion here
|
||||
}
|
||||
15
src/test/ui/macros/macro-in-expression-context.rs
Normal file
15
src/test/ui/macros/macro-in-expression-context.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// run-rustfix
|
||||
|
||||
macro_rules! foo {
|
||||
() => {
|
||||
assert_eq!("A", "A");
|
||||
assert_eq!("B", "B");
|
||||
}
|
||||
//~^^ ERROR macro expansion ignores token `assert_eq` and any following
|
||||
//~| NOTE the usage of `foo!` is likely invalid in expression context
|
||||
}
|
||||
|
||||
fn main() {
|
||||
foo!()
|
||||
//~^ NOTE caused by the macro expansion here
|
||||
}
|
||||
15
src/test/ui/macros/macro-in-expression-context.stderr
Normal file
15
src/test/ui/macros/macro-in-expression-context.stderr
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
error: macro expansion ignores token `assert_eq` and any following
|
||||
--> $DIR/macro-in-expression-context.rs:6:9
|
||||
|
|
||||
LL | assert_eq!("B", "B");
|
||||
| ^^^^^^^^^
|
||||
...
|
||||
LL | foo!()
|
||||
| ------- help: you might be missing a semicolon here: `;`
|
||||
| |
|
||||
| caused by the macro expansion here
|
||||
|
|
||||
= note: the usage of `foo!` is likely invalid in expression context
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
@ -2,55 +2,73 @@ error: `$ty:ty` is followed by `<`, which is not allowed for `ty` fragments
|
|||
--> $DIR/macro-input-future-proofing.rs:14:13
|
||||
|
|
||||
LL | ($ty:ty <) => (); //~ ERROR `$ty:ty` is followed by `<`, which is not allowed for `ty`
|
||||
| ^
|
||||
| ^ not allowed after `ty` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$ty:ty` is followed by `<`, which is not allowed for `ty` fragments
|
||||
--> $DIR/macro-input-future-proofing.rs:15:13
|
||||
|
|
||||
LL | ($ty:ty < foo ,) => (); //~ ERROR `$ty:ty` is followed by `<`, which is not allowed for `ty`
|
||||
| ^
|
||||
| ^ not allowed after `ty` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$pa:pat` is followed by `>`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-input-future-proofing.rs:21:14
|
||||
|
|
||||
LL | ($pa:pat >) => (); //~ ERROR `$pa:pat` is followed by `>`, which is not allowed for `pat`
|
||||
| ^
|
||||
| ^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$pa:pat` is followed by `$pb:pat`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-input-future-proofing.rs:23:14
|
||||
|
|
||||
LL | ($pa:pat $pb:pat $ty:ty ,) => ();
|
||||
| ^^^^^^^
|
||||
| ^^^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$pb:pat` is followed by `$ty:ty`, which is not allowed for `pat` fragments
|
||||
--> $DIR/macro-input-future-proofing.rs:23:22
|
||||
|
|
||||
LL | ($pa:pat $pb:pat $ty:ty ,) => ();
|
||||
| ^^^^^^
|
||||
| ^^^^^^ not allowed after `pat` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,`, `=`, `|`, `if` or `in`
|
||||
|
||||
error: `$ty:ty` is followed by `-`, which is not allowed for `ty` fragments
|
||||
--> $DIR/macro-input-future-proofing.rs:26:17
|
||||
|
|
||||
LL | ($($ty:ty)* -) => (); //~ ERROR `$ty:ty` is followed by `-`
|
||||
| ^
|
||||
| ^ not allowed after `ty` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$b:ty` is followed by `-`, which is not allowed for `ty` fragments
|
||||
--> $DIR/macro-input-future-proofing.rs:27:23
|
||||
|
|
||||
LL | ($($a:ty, $b:ty)* -) => (); //~ ERROR `$b:ty` is followed by `-`
|
||||
| ^
|
||||
| ^ not allowed after `ty` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$ty:ty` is followed by `-`, which is not allowed for `ty` fragments
|
||||
--> $DIR/macro-input-future-proofing.rs:28:7
|
||||
|
|
||||
LL | ($($ty:ty)-+) => (); //~ ERROR `$ty:ty` is followed by `-`, which is not allowed for `ty`
|
||||
| ^^^^^^^^
|
||||
| ^^^^^^^^ not allowed after `ty` fragments
|
||||
|
|
||||
= note: allowed there are: `{`, `[`, `=>`, `,`, `>`, `=`, `:`, `;`, `|`, `as` or `where`
|
||||
|
||||
error: `$a:expr` is followed by `$b:tt`, which is not allowed for `expr` fragments
|
||||
--> $DIR/macro-input-future-proofing.rs:29:21
|
||||
|
|
||||
LL | ( $($a:expr)* $($b:tt)* ) => { };
|
||||
| ^^^^^
|
||||
| ^^^^^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
error: no rules expected the token `a`
|
||||
--> $DIR/macro-non-lifetime.rs:18:8
|
||||
|
|
||||
LL | macro_rules! m { ($x:lifetime) => { } }
|
||||
| -------------- when calling this macro
|
||||
...
|
||||
LL | m!(a);
|
||||
| ^
|
||||
| ^ no rules expected the token `a`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -7,32 +7,44 @@ LL | println!("{}" a);
|
|||
error: no rules expected the token `b`
|
||||
--> $DIR/missing-comma.rs:22:12
|
||||
|
|
||||
LL | macro_rules! foo {
|
||||
| ---------------- when calling this macro
|
||||
...
|
||||
LL | foo!(a b);
|
||||
| -^
|
||||
| -^ no rules expected the token `b`
|
||||
| |
|
||||
| help: missing comma here
|
||||
|
||||
error: no rules expected the token `e`
|
||||
--> $DIR/missing-comma.rs:24:21
|
||||
|
|
||||
LL | macro_rules! foo {
|
||||
| ---------------- when calling this macro
|
||||
...
|
||||
LL | foo!(a, b, c, d e);
|
||||
| -^
|
||||
| -^ no rules expected the token `e`
|
||||
| |
|
||||
| help: missing comma here
|
||||
|
||||
error: no rules expected the token `d`
|
||||
--> $DIR/missing-comma.rs:26:18
|
||||
|
|
||||
LL | macro_rules! foo {
|
||||
| ---------------- when calling this macro
|
||||
...
|
||||
LL | foo!(a, b, c d, e);
|
||||
| -^
|
||||
| -^ no rules expected the token `d`
|
||||
| |
|
||||
| help: missing comma here
|
||||
|
||||
error: no rules expected the token `d`
|
||||
--> $DIR/missing-comma.rs:28:18
|
||||
|
|
||||
LL | macro_rules! foo {
|
||||
| ---------------- when calling this macro
|
||||
...
|
||||
LL | foo!(a, b, c d e);
|
||||
| ^
|
||||
| ^ no rules expected the token `d`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: no rules expected the token `enum E { }`
|
|||
--> $DIR/nonterminal-matching.rs:29:10
|
||||
|
|
||||
LL | n!(a $nt_item b); //~ ERROR no rules expected the token `enum E { }`
|
||||
| ^^^^^^^^
|
||||
| ^^^^^^^^ no rules expected the token `enum E { }`
|
||||
...
|
||||
LL | complex_nonterminal!(enum E {});
|
||||
| -------------------------------- in this macro invocation
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
error: no rules expected the token `bcd`
|
||||
--> $DIR/trace_faulty_macros.rs:17:26
|
||||
|
|
||||
LL | macro_rules! my_faulty_macro {
|
||||
| ---------------------------- when calling this macro
|
||||
LL | () => {
|
||||
LL | my_faulty_macro!(bcd); //~ ERROR no rules
|
||||
| ^^^
|
||||
| ^^^ no rules expected the token `bcd`
|
||||
...
|
||||
LL | my_faulty_macro!();
|
||||
| ------------------- in this macro invocation
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
error: no rules expected the token `!`
|
||||
--> $DIR/macro-doc-comments-1.rs:16:5
|
||||
|
|
||||
LL | macro_rules! outer {
|
||||
| ------------------ when calling this macro
|
||||
...
|
||||
LL | //! Inner
|
||||
| ^^^^^^^^^
|
||||
| ^^^^^^^^^ no rules expected the token `!`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
error: no rules expected the token `[`
|
||||
--> $DIR/macro-doc-comments-2.rs:16:5
|
||||
|
|
||||
LL | macro_rules! inner {
|
||||
| ------------------ when calling this macro
|
||||
...
|
||||
LL | /// Outer
|
||||
| ^
|
||||
| ^ no rules expected the token `[`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,11 @@ error: macro expansion ignores token `,` and any following
|
|||
|
|
||||
LL | , //~ ERROR macro expansion ignores token `,`
|
||||
| ^
|
||||
|
|
||||
note: caused by the macro expansion here; the usage of `ignored_item!` is likely invalid in item context
|
||||
--> $DIR/macro-incomplete-parse.rs:31:1
|
||||
|
|
||||
...
|
||||
LL | ignored_item!();
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
| ---------------- caused by the macro expansion here
|
||||
|
|
||||
= note: the usage of `ignored_item!` is likely invalid in item context
|
||||
|
||||
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
|
||||
--> $DIR/macro-incomplete-parse.rs:22:14
|
||||
|
|
@ -24,12 +23,11 @@ error: macro expansion ignores token `,` and any following
|
|||
|
|
||||
LL | () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,`
|
||||
| ^
|
||||
|
|
||||
note: caused by the macro expansion here; the usage of `ignored_pat!` is likely invalid in pattern context
|
||||
--> $DIR/macro-incomplete-parse.rs:36:9
|
||||
|
|
||||
...
|
||||
LL | ignored_pat!() => (),
|
||||
| ^^^^^^^^^^^^^^
|
||||
| -------------- caused by the macro expansion here
|
||||
|
|
||||
= note: the usage of `ignored_pat!` is likely invalid in pattern context
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
error: no rules expected the token `_`
|
||||
--> $DIR/underscore-ident-matcher.rs:18:19
|
||||
|
|
||||
LL | macro_rules! identity {
|
||||
| --------------------- when calling this macro
|
||||
...
|
||||
LL | let identity!(_) = 10; //~ ERROR no rules expected the token `_`
|
||||
| ^
|
||||
| ^ no rules expected the token `_`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ error: `$e:expr` is followed by `+`, which is not allowed for `expr` fragments
|
|||
--> $DIR/unused-macro-with-follow-violation.rs:14:14
|
||||
|
|
||||
LL | ($e:expr +) => () //~ ERROR not allowed for `expr` fragments
|
||||
| ^
|
||||
| ^ not allowed after `expr` fragments
|
||||
|
|
||||
= note: allowed there are: `=>`, `,` or `;`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: no rules expected the token `,`
|
|||
--> $DIR/vec-macro-with-comma-only.rs:12:10
|
||||
|
|
||||
LL | vec![,]; //~ ERROR no rules expected the token `,`
|
||||
| ^
|
||||
| ^ no rules expected the token `,`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue