summaryrefslogtreecommitdiffstats
path: root/src/test/ui/proc-macro/derive-helper-shadowing.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/proc-macro/derive-helper-shadowing.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/proc-macro/derive-helper-shadowing.stderr')
-rw-r--r--src/test/ui/proc-macro/derive-helper-shadowing.stderr89
1 files changed, 89 insertions, 0 deletions
diff --git a/src/test/ui/proc-macro/derive-helper-shadowing.stderr b/src/test/ui/proc-macro/derive-helper-shadowing.stderr
new file mode 100644
index 000000000..d8287eb73
--- /dev/null
+++ b/src/test/ui/proc-macro/derive-helper-shadowing.stderr
@@ -0,0 +1,89 @@
+error: cannot use a derive helper attribute through an import
+ --> $DIR/derive-helper-shadowing.rs:42:15
+ |
+LL | #[renamed]
+ | ^^^^^^^
+ |
+note: the derive helper attribute imported here
+ --> $DIR/derive-helper-shadowing.rs:41:17
+ |
+LL | use empty_helper as renamed;
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+error: cannot find attribute `empty_helper` in this scope
+ --> $DIR/derive-helper-shadowing.rs:38:22
+ |
+LL | #[derive(GenHelperUse)]
+ | ^^^^^^^^^^^^
+ |
+ = note: consider importing this attribute macro:
+ empty_helper
+ = note: this error originates in the derive macro `GenHelperUse` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: cannot find attribute `empty_helper` in this scope
+ --> $DIR/derive-helper-shadowing.rs:14:11
+ |
+LL | #[empty_helper]
+ | ^^^^^^^^^^^^
+...
+LL | gen_helper_use!();
+ | ----------------- in this macro invocation
+ |
+ = note: consider importing this attribute macro:
+ crate::empty_helper
+ = note: this error originates in the macro `gen_helper_use` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0659]: `empty_helper` is ambiguous
+ --> $DIR/derive-helper-shadowing.rs:26:13
+ |
+LL | use empty_helper;
+ | ^^^^^^^^^^^^ ambiguous name
+ |
+ = note: ambiguous because of multiple potential import sources
+note: `empty_helper` could refer to the derive helper attribute defined here
+ --> $DIR/derive-helper-shadowing.rs:22:10
+ |
+LL | #[derive(Empty)]
+ | ^^^^^
+note: `empty_helper` could also refer to the attribute macro imported here
+ --> $DIR/derive-helper-shadowing.rs:10:5
+ |
+LL | use test_macros::empty_attr as empty_helper;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ = help: use `crate::empty_helper` to refer to this attribute macro unambiguously
+
+error[E0659]: `empty_helper` is ambiguous
+ --> $DIR/derive-helper-shadowing.rs:19:3
+ |
+LL | #[empty_helper]
+ | ^^^^^^^^^^^^ ambiguous name
+ |
+ = note: ambiguous because of a name conflict with a derive helper attribute
+note: `empty_helper` could refer to the derive helper attribute defined here
+ --> $DIR/derive-helper-shadowing.rs:22:10
+ |
+LL | #[derive(Empty)]
+ | ^^^^^
+note: `empty_helper` could also refer to the attribute macro imported here
+ --> $DIR/derive-helper-shadowing.rs:10:5
+ |
+LL | use test_macros::empty_attr as empty_helper;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ = help: use `crate::empty_helper` to refer to this attribute macro unambiguously
+
+warning: derive helper attribute is used before it is introduced
+ --> $DIR/derive-helper-shadowing.rs:19:3
+ |
+LL | #[empty_helper]
+ | ^^^^^^^^^^^^
+...
+LL | #[derive(Empty)]
+ | ----- the attribute is introduced here
+ |
+ = note: `#[warn(legacy_derive_helpers)]` on by default
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
+
+error: aborting due to 5 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0659`.