--bless some tests
This commit is contained in:
parent
b3bc427228
commit
cf2d4236eb
10 changed files with 103 additions and 191 deletions
|
|
@ -7,8 +7,8 @@ LL | produces_async! {}
|
|||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: you can escape reserved keywords to use them as identifiers
|
||||
|
|
||||
LL | () => (pub fn r#async () { })
|
||||
| ^^^^^^^
|
||||
LL | r#async
|
||||
|
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@ LL | r#async = consumes_async_raw!(async);
|
|||
| ^^^^^ no rules expected this token in macro call
|
||||
|
||||
error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
|
||||
--> <::edition_kw_macro_2015::passes_ident macros>:1:22
|
||||
--> $DIR/auxiliary/edition-kw-macro-2015.rs:27:23
|
||||
|
|
||||
LL | ($ i : ident) => ($ i)
|
||||
| ^ expected one of `move`, `|`, or `||`
|
||||
LL | ($i: ident) => ($i)
|
||||
| ^ expected one of `move`, `|`, or `||`
|
||||
|
|
||||
::: $DIR/edition-keywords-2018-2015-parsing.rs:16:8
|
||||
|
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ LL | produces_async! {}
|
|||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: you can escape reserved keywords to use them as identifiers
|
||||
|
|
||||
LL | () => (pub fn r#async () { })
|
||||
| ^^^^^^^
|
||||
LL | r#async
|
||||
|
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@ LL | r#async = consumes_async_raw!(async);
|
|||
| ^^^^^ no rules expected this token in macro call
|
||||
|
||||
error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
|
||||
--> <::edition_kw_macro_2018::passes_ident macros>:1:22
|
||||
--> $DIR/auxiliary/edition-kw-macro-2018.rs:27:23
|
||||
|
|
||||
LL | ($ i : ident) => ($ i)
|
||||
| ^ expected one of `move`, `|`, or `||`
|
||||
LL | ($i: ident) => ($i)
|
||||
| ^ expected one of `move`, `|`, or `||`
|
||||
|
|
||||
::: $DIR/edition-keywords-2018-2018-parsing.rs:16:8
|
||||
|
|
||||
|
|
|
|||
|
|
@ -13,66 +13,70 @@ LL | pong!();
|
|||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
|
||||
--> $DIR/main.rs:10:20
|
||||
|
|
||||
LL | / macro_rules! pong {
|
||||
LL | | () => { syntax error };
|
||||
| | ^^^^^ expected one of 8 possible tokens
|
||||
LL | | }
|
||||
| |_- in this expansion of `pong!`
|
||||
LL | / macro_rules! pong {
|
||||
LL | | () => { syntax error };
|
||||
| | ^^^^^ expected one of 8 possible tokens
|
||||
LL | | }
|
||||
| |__- in this expansion of `pong!`
|
||||
...
|
||||
LL | ping!();
|
||||
| -------- in this macro invocation
|
||||
LL | ping!();
|
||||
| -------- in this macro invocation
|
||||
|
|
||||
::: <::ping::ping macros>:1:1
|
||||
::: $DIR/auxiliary/ping.rs:5:1
|
||||
|
|
||||
LL | () => { pong ! () ; }
|
||||
| ---------------------
|
||||
| | |
|
||||
| | in this macro invocation
|
||||
| in this expansion of `ping!`
|
||||
LL | / macro_rules! ping {
|
||||
LL | | () => {
|
||||
LL | | pong!();
|
||||
| | -------- in this macro invocation
|
||||
LL | | }
|
||||
LL | | }
|
||||
| |_- in this expansion of `ping!`
|
||||
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
|
||||
--> $DIR/main.rs:10:20
|
||||
|
|
||||
LL | / macro_rules! pong {
|
||||
LL | | () => { syntax error };
|
||||
| | ^^^^^ expected one of 8 possible tokens
|
||||
LL | | }
|
||||
| |_- in this expansion of `pong!` (#5)
|
||||
LL | / macro_rules! pong {
|
||||
LL | | () => { syntax error };
|
||||
| | ^^^^^ expected one of 8 possible tokens
|
||||
LL | | }
|
||||
| |__- in this expansion of `pong!` (#5)
|
||||
...
|
||||
LL | deep!();
|
||||
| -------- in this macro invocation (#1)
|
||||
LL | deep!();
|
||||
| -------- in this macro invocation (#1)
|
||||
|
|
||||
::: <::ping::deep macros>:1:1
|
||||
::: $DIR/auxiliary/ping.rs:5:1
|
||||
|
|
||||
LL | () => { foo ! () ; }
|
||||
| --------------------
|
||||
| | |
|
||||
| | in this macro invocation (#2)
|
||||
| in this expansion of `deep!` (#1)
|
||||
|
|
||||
::: <::ping::foo macros>:1:1
|
||||
|
|
||||
LL | () => { bar ! () ; }
|
||||
| --------------------
|
||||
| | |
|
||||
| | in this macro invocation (#3)
|
||||
| in this expansion of `foo!` (#2)
|
||||
|
|
||||
::: <::ping::bar macros>:1:1
|
||||
|
|
||||
LL | () => { ping ! () ; }
|
||||
| ---------------------
|
||||
| | |
|
||||
| | in this macro invocation (#4)
|
||||
| in this expansion of `bar!` (#3)
|
||||
|
|
||||
::: <::ping::ping macros>:1:1
|
||||
|
|
||||
LL | () => { pong ! () ; }
|
||||
| ---------------------
|
||||
| | |
|
||||
| | in this macro invocation (#5)
|
||||
| in this expansion of `ping!` (#4)
|
||||
LL | / macro_rules! ping {
|
||||
LL | | () => {
|
||||
LL | | pong!();
|
||||
| | -------- in this macro invocation (#5)
|
||||
LL | | }
|
||||
LL | | }
|
||||
| |_- in this expansion of `ping!` (#4)
|
||||
...
|
||||
LL | / macro_rules! deep {
|
||||
LL | | () => {
|
||||
LL | | foo!();
|
||||
| | ------- in this macro invocation (#2)
|
||||
LL | | }
|
||||
LL | | }
|
||||
| |__- in this expansion of `deep!` (#1)
|
||||
...
|
||||
LL | / macro_rules! foo {
|
||||
LL | | () => {
|
||||
LL | | bar!();
|
||||
| | ------- in this macro invocation (#3)
|
||||
LL | | }
|
||||
LL | | }
|
||||
| |__- in this expansion of `foo!` (#2)
|
||||
...
|
||||
LL | / macro_rules! bar {
|
||||
LL | | () => {
|
||||
LL | | ping!();
|
||||
| | -------- in this macro invocation (#4)
|
||||
LL | | }
|
||||
LL | | }
|
||||
| |__- in this expansion of `bar!` (#3)
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,14 @@ LL | macro_rules! unknown { () => () }
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: cannot find a built-in macro with name `line`
|
||||
--> <::core::macros::builtin::line macros>:1:1
|
||||
--> $SRC_DIR/libcore/macros/mod.rs:LL:COL
|
||||
|
|
||||
LL | () => { } ;
|
||||
| ^^^^^^^^^^^
|
||||
LL | / macro_rules! line {
|
||||
LL | | () => {
|
||||
LL | | /* compiler built-in */
|
||||
LL | | };
|
||||
LL | | }
|
||||
| |_____^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -42,10 +42,13 @@ LL | ($ident:ident) => { let $ident: i32 = 42; }
|
|||
error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
|
||||
--> $DIR/method-on-ambiguous-numeric-type.rs:30:9
|
||||
|
|
||||
LL | mac!(bar);
|
||||
| ---------- you must specify a type for this binding, like `i32`
|
||||
LL | bar.pow(2);
|
||||
| ^^^
|
||||
|
|
||||
help: you must specify a type for this binding, like `i32`
|
||||
|
|
||||
LL | ($ident:ident) => { let $ident: i32 = 42; }
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -21,21 +21,10 @@ LL | local_def;
|
|||
| ^^^^^^^^^ not found in this scope
|
||||
|
||||
error[E0412]: cannot find type `ItemUse` in crate `$crate`
|
||||
--> $DIR/auxiliary/mixed-site-span.rs:14:1
|
||||
--> $DIR/mixed-site-span.rs:26:1
|
||||
|
|
||||
LL | / pub fn proc_macro_rules(input: TokenStream) -> TokenStream {
|
||||
LL | | if input.is_empty() {
|
||||
LL | | let id = |s| TokenTree::from(Ident::new(s, Span::mixed_site()));
|
||||
LL | | let item_def = id("ItemDef");
|
||||
... |
|
||||
LL | | }
|
||||
LL | | }
|
||||
| |_^ not found in `$crate`
|
||||
|
|
||||
::: $DIR/mixed-site-span.rs:26:1
|
||||
|
|
||||
LL | pass_dollar_crate!();
|
||||
| --------------------- in this macro invocation
|
||||
LL | pass_dollar_crate!();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: possible candidate is found in another module, you can import it into scope
|
||||
|
|
|
|||
|
|
@ -1,19 +1,8 @@
|
|||
error: hello to you, too!
|
||||
--> $DIR/auxiliary/multispan.rs:31:1
|
||||
--> $DIR/multispan.rs:14:5
|
||||
|
|
||||
LL | / pub fn hello(input: TokenStream) -> TokenStream {
|
||||
LL | | if let Err(diag) = parse(input) {
|
||||
LL | | diag.emit();
|
||||
LL | | }
|
||||
LL | |
|
||||
LL | | TokenStream::new()
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
::: $DIR/multispan.rs:14:5
|
||||
|
|
||||
LL | hello!(hi);
|
||||
| ----------- in this macro invocation
|
||||
LL | hello!(hi);
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
note: found these 'hi's
|
||||
--> $DIR/multispan.rs:14:12
|
||||
|
|
@ -23,21 +12,10 @@ LL | hello!(hi);
|
|||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: hello to you, too!
|
||||
--> $DIR/auxiliary/multispan.rs:31:1
|
||||
--> $DIR/multispan.rs:17:5
|
||||
|
|
||||
LL | / pub fn hello(input: TokenStream) -> TokenStream {
|
||||
LL | | if let Err(diag) = parse(input) {
|
||||
LL | | diag.emit();
|
||||
LL | | }
|
||||
LL | |
|
||||
LL | | TokenStream::new()
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
::: $DIR/multispan.rs:17:5
|
||||
|
|
||||
LL | hello!(hi hi);
|
||||
| -------------- in this macro invocation
|
||||
LL | hello!(hi hi);
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
note: found these 'hi's
|
||||
--> $DIR/multispan.rs:17:12
|
||||
|
|
@ -47,21 +25,10 @@ LL | hello!(hi hi);
|
|||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: hello to you, too!
|
||||
--> $DIR/auxiliary/multispan.rs:31:1
|
||||
--> $DIR/multispan.rs:20:5
|
||||
|
|
||||
LL | / pub fn hello(input: TokenStream) -> TokenStream {
|
||||
LL | | if let Err(diag) = parse(input) {
|
||||
LL | | diag.emit();
|
||||
LL | | }
|
||||
LL | |
|
||||
LL | | TokenStream::new()
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
::: $DIR/multispan.rs:20:5
|
||||
|
|
||||
LL | hello!(hi hi hi);
|
||||
| ----------------- in this macro invocation
|
||||
LL | hello!(hi hi hi);
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: found these 'hi's
|
||||
--> $DIR/multispan.rs:20:12
|
||||
|
|
@ -71,21 +38,10 @@ LL | hello!(hi hi hi);
|
|||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: hello to you, too!
|
||||
--> $DIR/auxiliary/multispan.rs:31:1
|
||||
--> $DIR/multispan.rs:23:5
|
||||
|
|
||||
LL | / pub fn hello(input: TokenStream) -> TokenStream {
|
||||
LL | | if let Err(diag) = parse(input) {
|
||||
LL | | diag.emit();
|
||||
LL | | }
|
||||
LL | |
|
||||
LL | | TokenStream::new()
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
::: $DIR/multispan.rs:23:5
|
||||
|
|
||||
LL | hello!(hi hey hi yo hi beep beep hi hi);
|
||||
| ---------------------------------------- in this macro invocation
|
||||
LL | hello!(hi hey hi yo hi beep beep hi hi);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: found these 'hi's
|
||||
--> $DIR/multispan.rs:23:12
|
||||
|
|
@ -95,21 +51,10 @@ LL | hello!(hi hey hi yo hi beep beep hi hi);
|
|||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: hello to you, too!
|
||||
--> $DIR/auxiliary/multispan.rs:31:1
|
||||
--> $DIR/multispan.rs:24:5
|
||||
|
|
||||
LL | / pub fn hello(input: TokenStream) -> TokenStream {
|
||||
LL | | if let Err(diag) = parse(input) {
|
||||
LL | | diag.emit();
|
||||
LL | | }
|
||||
LL | |
|
||||
LL | | TokenStream::new()
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
::: $DIR/multispan.rs:24:5
|
||||
|
|
||||
LL | hello!(hi there, hi how are you? hi... hi.);
|
||||
| -------------------------------------------- in this macro invocation
|
||||
LL | hello!(hi there, hi how are you? hi... hi.);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: found these 'hi's
|
||||
--> $DIR/multispan.rs:24:12
|
||||
|
|
@ -119,21 +64,10 @@ LL | hello!(hi there, hi how are you? hi... hi.);
|
|||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: hello to you, too!
|
||||
--> $DIR/auxiliary/multispan.rs:31:1
|
||||
--> $DIR/multispan.rs:25:5
|
||||
|
|
||||
LL | / pub fn hello(input: TokenStream) -> TokenStream {
|
||||
LL | | if let Err(diag) = parse(input) {
|
||||
LL | | diag.emit();
|
||||
LL | | }
|
||||
LL | |
|
||||
LL | | TokenStream::new()
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
::: $DIR/multispan.rs:25:5
|
||||
|
|
||||
LL | hello!(whoah. hi di hi di ho);
|
||||
| ------------------------------ in this macro invocation
|
||||
LL | hello!(whoah. hi di hi di ho);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: found these 'hi's
|
||||
--> $DIR/multispan.rs:25:19
|
||||
|
|
@ -143,21 +77,10 @@ LL | hello!(whoah. hi di hi di ho);
|
|||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: hello to you, too!
|
||||
--> $DIR/auxiliary/multispan.rs:31:1
|
||||
--> $DIR/multispan.rs:26:5
|
||||
|
|
||||
LL | / pub fn hello(input: TokenStream) -> TokenStream {
|
||||
LL | | if let Err(diag) = parse(input) {
|
||||
LL | | diag.emit();
|
||||
LL | | }
|
||||
LL | |
|
||||
LL | | TokenStream::new()
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
::: $DIR/multispan.rs:26:5
|
||||
|
|
||||
LL | hello!(hi good hi and good bye);
|
||||
| -------------------------------- in this macro invocation
|
||||
LL | hello!(hi good hi and good bye);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: found these 'hi's
|
||||
--> $DIR/multispan.rs:26:12
|
||||
|
|
|
|||
|
|
@ -1,19 +1,8 @@
|
|||
error: found 2 equal signs, need exactly 3
|
||||
--> $DIR/auxiliary/three-equals.rs:42:1
|
||||
--> $DIR/three-equals.rs:15:5
|
||||
|
|
||||
LL | / pub fn three_equals(input: TokenStream) -> TokenStream {
|
||||
LL | | if let Err(diag) = parse(input) {
|
||||
LL | | diag.emit();
|
||||
LL | | return TokenStream::new();
|
||||
... |
|
||||
LL | | "3".parse().unwrap()
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
::: $DIR/three-equals.rs:15:5
|
||||
|
|
||||
LL | three_equals!(==);
|
||||
| ------------------ in this macro invocation
|
||||
LL | three_equals!(==);
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: input must be: `===`
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue