fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.2 KiB42 linesraw
1error: expected identifier, found reserved identifier `$crate`
2  --> $DIR/dollar-crate-is-keyword.rs:6:20
3   |
4LL |             struct $crate {}
5   |                    ^^^^^^ expected identifier, found reserved identifier
6...
7LL | m!();
8   | ----- in this macro invocation
9
10error: expected identifier, found reserved identifier `$crate`
11  --> $DIR/dollar-crate-is-keyword.rs:11:23
12   |
13LL |         use $crate as $crate;
14   |                       ^^^^^^ expected identifier, found reserved identifier
15...
16LL | m!();
17   | ----- in this macro invocation
18
19warning: `$crate` may not be imported
20  --> $DIR/dollar-crate-is-keyword.rs:9:9
21   |
22LL |         use $crate; // OK
23   |         ^^^^^^^^^^^
24...
25LL | m!();
26   | ----- in this macro invocation
27   |
28   = note: `use $crate;` was erroneously allowed and will become a hard error in a future release
29
30warning: `$crate` may not be imported
31  --> $DIR/dollar-crate-is-keyword.rs:11:9
32   |
33LL |         use $crate as $crate;
34   |         ^^^^^^^^^^^^^^^^^^^^^
35...
36LL | m!();
37   | ----- in this macro invocation
38   |
39   = note: `use $crate;` was erroneously allowed and will become a hard error in a future release
40
41error: aborting due to 2 previous errors
42