Skip to content

Commit cf2d423

Browse files
committed
--bless some tests
1 parent b3bc427 commit cf2d423

10 files changed

+112
-200
lines changed

src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ LL | produces_async! {}
77
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
88
help: you can escape reserved keywords to use them as identifiers
99
|
10-
LL | () => (pub fn r#async () { })
11-
| ^^^^^^^
10+
LL | r#async
11+
|
1212

1313
error: aborting due to previous error
1414

src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ LL | r#async = consumes_async_raw!(async);
3333
| ^^^^^ no rules expected this token in macro call
3434

3535
error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
36-
--> <::edition_kw_macro_2015::passes_ident macros>:1:22
36+
--> $DIR/auxiliary/edition-kw-macro-2015.rs:27:23
3737
|
38-
LL | ($ i : ident) => ($ i)
39-
| ^ expected one of `move`, `|`, or `||`
38+
LL | ($i: ident) => ($i)
39+
| ^ expected one of `move`, `|`, or `||`
4040
|
4141
::: $DIR/edition-keywords-2018-2015-parsing.rs:16:8
4242
|

src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ LL | produces_async! {}
77
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
88
help: you can escape reserved keywords to use them as identifiers
99
|
10-
LL | () => (pub fn r#async () { })
11-
| ^^^^^^^
10+
LL | r#async
11+
|
1212

1313
error: aborting due to previous error
1414

src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ LL | r#async = consumes_async_raw!(async);
3333
| ^^^^^ no rules expected this token in macro call
3434

3535
error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
36-
--> <::edition_kw_macro_2018::passes_ident macros>:1:22
36+
--> $DIR/auxiliary/edition-kw-macro-2018.rs:27:23
3737
|
38-
LL | ($ i : ident) => ($ i)
39-
| ^ expected one of `move`, `|`, or `||`
38+
LL | ($i: ident) => ($i)
39+
| ^ expected one of `move`, `|`, or `||`
4040
|
4141
::: $DIR/edition-keywords-2018-2018-parsing.rs:16:8
4242
|

src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr

Lines changed: 54 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,66 +13,70 @@ LL | pong!();
1313
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
1414
--> $DIR/main.rs:10:20
1515
|
16-
LL | / macro_rules! pong {
17-
LL | | () => { syntax error };
18-
| | ^^^^^ expected one of 8 possible tokens
19-
LL | | }
20-
| |_- in this expansion of `pong!`
16+
LL | / macro_rules! pong {
17+
LL | | () => { syntax error };
18+
| | ^^^^^ expected one of 8 possible tokens
19+
LL | | }
20+
| |__- in this expansion of `pong!`
2121
...
22-
LL | ping!();
23-
| -------- in this macro invocation
22+
LL | ping!();
23+
| -------- in this macro invocation
2424
|
25-
::: <::ping::ping macros>:1:1
25+
::: $DIR/auxiliary/ping.rs:5:1
2626
|
27-
LL | () => { pong ! () ; }
28-
| ---------------------
29-
| | |
30-
| | in this macro invocation
31-
| in this expansion of `ping!`
27+
LL | / macro_rules! ping {
28+
LL | | () => {
29+
LL | | pong!();
30+
| | -------- in this macro invocation
31+
LL | | }
32+
LL | | }
33+
| |_- in this expansion of `ping!`
3234

3335
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
3436
--> $DIR/main.rs:10:20
3537
|
36-
LL | / macro_rules! pong {
37-
LL | | () => { syntax error };
38-
| | ^^^^^ expected one of 8 possible tokens
39-
LL | | }
40-
| |_- in this expansion of `pong!` (#5)
38+
LL | / macro_rules! pong {
39+
LL | | () => { syntax error };
40+
| | ^^^^^ expected one of 8 possible tokens
41+
LL | | }
42+
| |__- in this expansion of `pong!` (#5)
4143
...
42-
LL | deep!();
43-
| -------- in this macro invocation (#1)
44+
LL | deep!();
45+
| -------- in this macro invocation (#1)
4446
|
45-
::: <::ping::deep macros>:1:1
47+
::: $DIR/auxiliary/ping.rs:5:1
4648
|
47-
LL | () => { foo ! () ; }
48-
| --------------------
49-
| | |
50-
| | in this macro invocation (#2)
51-
| in this expansion of `deep!` (#1)
52-
|
53-
::: <::ping::foo macros>:1:1
54-
|
55-
LL | () => { bar ! () ; }
56-
| --------------------
57-
| | |
58-
| | in this macro invocation (#3)
59-
| in this expansion of `foo!` (#2)
60-
|
61-
::: <::ping::bar macros>:1:1
62-
|
63-
LL | () => { ping ! () ; }
64-
| ---------------------
65-
| | |
66-
| | in this macro invocation (#4)
67-
| in this expansion of `bar!` (#3)
68-
|
69-
::: <::ping::ping macros>:1:1
70-
|
71-
LL | () => { pong ! () ; }
72-
| ---------------------
73-
| | |
74-
| | in this macro invocation (#5)
75-
| in this expansion of `ping!` (#4)
49+
LL | / macro_rules! ping {
50+
LL | | () => {
51+
LL | | pong!();
52+
| | -------- in this macro invocation (#5)
53+
LL | | }
54+
LL | | }
55+
| |_- in this expansion of `ping!` (#4)
56+
...
57+
LL | / macro_rules! deep {
58+
LL | | () => {
59+
LL | | foo!();
60+
| | ------- in this macro invocation (#2)
61+
LL | | }
62+
LL | | }
63+
| |__- in this expansion of `deep!` (#1)
64+
...
65+
LL | / macro_rules! foo {
66+
LL | | () => {
67+
LL | | bar!();
68+
| | ------- in this macro invocation (#3)
69+
LL | | }
70+
LL | | }
71+
| |__- in this expansion of `foo!` (#2)
72+
...
73+
LL | / macro_rules! bar {
74+
LL | | () => {
75+
LL | | ping!();
76+
| | -------- in this macro invocation (#4)
77+
LL | | }
78+
LL | | }
79+
| |__- in this expansion of `bar!` (#3)
7680

7781
error: aborting due to 3 previous errors
7882

src/test/ui/macros/unknown-builtin.stderr

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ LL | macro_rules! unknown { () => () }
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: cannot find a built-in macro with name `line`
8-
--> <::core::macros::builtin::line macros>:1:1
8+
--> $SRC_DIR/libcore/macros/mod.rs:LL:COL
99
|
10-
LL | () => { } ;
11-
| ^^^^^^^^^^^
10+
LL | / macro_rules! line {
11+
LL | | () => {
12+
LL | | /* compiler built-in */
13+
LL | | };
14+
LL | | }
15+
| |_____^
1216

1317
error: aborting due to 2 previous errors
1418

src/test/ui/methods/method-on-ambiguous-numeric-type.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,13 @@ LL | ($ident:ident) => { let $ident: i32 = 42; }
4242
error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
4343
--> $DIR/method-on-ambiguous-numeric-type.rs:30:9
4444
|
45-
LL | mac!(bar);
46-
| ---------- you must specify a type for this binding, like `i32`
4745
LL | bar.pow(2);
4846
| ^^^
47+
|
48+
help: you must specify a type for this binding, like `i32`
49+
|
50+
LL | ($ident:ident) => { let $ident: i32 = 42; }
51+
| ^^^^^^^^^^^
4952

5053
error: aborting due to 5 previous errors
5154

src/test/ui/proc-macro/mixed-site-span.stderr

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,10 @@ LL | local_def;
2121
| ^^^^^^^^^ not found in this scope
2222

2323
error[E0412]: cannot find type `ItemUse` in crate `$crate`
24-
--> $DIR/auxiliary/mixed-site-span.rs:14:1
25-
|
26-
LL | / pub fn proc_macro_rules(input: TokenStream) -> TokenStream {
27-
LL | | if input.is_empty() {
28-
LL | | let id = |s| TokenTree::from(Ident::new(s, Span::mixed_site()));
29-
LL | | let item_def = id("ItemDef");
30-
... |
31-
LL | | }
32-
LL | | }
33-
| |_^ not found in `$crate`
34-
|
35-
::: $DIR/mixed-site-span.rs:26:1
36-
|
37-
LL | pass_dollar_crate!();
38-
| --------------------- in this macro invocation
24+
--> $DIR/mixed-site-span.rs:26:1
25+
|
26+
LL | pass_dollar_crate!();
27+
| ^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
3928
|
4029
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
4130
help: possible candidate is found in another module, you can import it into scope

0 commit comments

Comments
 (0)