fork/rust

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

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
2.2 KiB66 linesraw
1error: cannot use a derive helper attribute through an import
2  --> $DIR/derive-helper-shadowing.rs:40:15
3   |
4LL |             #[renamed]
5   |               ^^^^^^^
6   |
7note: the derive helper attribute imported here
8  --> $DIR/derive-helper-shadowing.rs:39:17
9   |
10LL |             use empty_helper as renamed;
11   |                 ^^^^^^^^^^^^^^^^^^^^^^^
12
13error: cannot find attribute `empty_helper` in this scope
14  --> $DIR/derive-helper-shadowing.rs:36:22
15   |
16LL |             #[derive(GenHelperUse)]
17   |                      ^^^^^^^^^^^^
18
19error: cannot find attribute `empty_helper` in this scope
20  --> $DIR/derive-helper-shadowing.rs:14:11
21   |
22LL |         #[empty_helper]
23   |           ^^^^^^^^^^^^
24...
25LL |             gen_helper_use!();
26   |             ------------------ in this macro invocation
27
28error[E0659]: `empty_helper` is ambiguous (name vs any other name during import resolution)
29  --> $DIR/derive-helper-shadowing.rs:24:13
30   |
31LL |         use empty_helper;
32   |             ^^^^^^^^^^^^ ambiguous name
33   |
34note: `empty_helper` could refer to the derive helper attribute defined here
35  --> $DIR/derive-helper-shadowing.rs:20:10
36   |
37LL | #[derive(Empty)]
38   |          ^^^^^
39note: `empty_helper` could also refer to the attribute macro imported here
40  --> $DIR/derive-helper-shadowing.rs:10:5
41   |
42LL | use test_macros::empty_attr as empty_helper;
43   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44   = help: use `crate::empty_helper` to refer to this attribute macro unambiguously
45
46error[E0659]: `empty_helper` is ambiguous (derive helper attribute vs any other name)
47  --> $DIR/derive-helper-shadowing.rs:19:3
48   |
49LL | #[empty_helper]
50   |   ^^^^^^^^^^^^ ambiguous name
51   |
52note: `empty_helper` could refer to the derive helper attribute defined here
53  --> $DIR/derive-helper-shadowing.rs:20:10
54   |
55LL | #[derive(Empty)]
56   |          ^^^^^
57note: `empty_helper` could also refer to the attribute macro imported here
58  --> $DIR/derive-helper-shadowing.rs:10:5
59   |
60LL | use test_macros::empty_attr as empty_helper;
61   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62   = help: use `crate::empty_helper` to refer to this attribute macro unambiguously
63
64error: aborting due to 5 previous errors
65
66For more information about this error, try `rustc --explain E0659`.