about summary refs log tree commit diff
path: root/tests/ui/imports/auxiliary/same-res-ambigious-extern.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-10-02 15:23:49 +0000
committerbors <bors@rust-lang.org>2025-10-02 15:23:49 +0000
commit5c7ae0c7ed184c603e5224604a9f33ca0e8e0b36 (patch)
tree680293a7177ccd6aa8287bb24249545861bb23e4 /tests/ui/imports/auxiliary/same-res-ambigious-extern.rs
parent94ecb52bbeeccc990545d4ebc9e9c35dcaf285e3 (diff)
parenta7eed086b913d708c9f38ce9c833e403f00fc15d (diff)
downloadrust-5c7ae0c7ed184c603e5224604a9f33ca0e8e0b36.tar.gz
rust-5c7ae0c7ed184c603e5224604a9f33ca0e8e0b36.zip
Auto merge of #147196 - LorrensP-2158466:same-res-ambiguity-test, r=petrochenkov
Test: Ambigious bindings in same namespace with the same res

Add a test based on the discussion [here](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Parallel.20Macro.20Expansion/near/542316157) and related to https://github.com/rust-lang/rust/issues/145575#issuecomment-3228868375.

This is the most reduced form I could create that passes on nightly but fails with rust-lang/rust#145108 (see [#gsoc > Project: Parallel Macro Expansion @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Parallel.20Macro.20Expansion/near/542335131)).

Also not sure about the test names.

r? `@petrochenkov`
Diffstat (limited to 'tests/ui/imports/auxiliary/same-res-ambigious-extern.rs')
-rw-r--r--tests/ui/imports/auxiliary/same-res-ambigious-extern.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/imports/auxiliary/same-res-ambigious-extern.rs b/tests/ui/imports/auxiliary/same-res-ambigious-extern.rs
new file mode 100644
index 00000000000..5269dcd0b17
--- /dev/null
+++ b/tests/ui/imports/auxiliary/same-res-ambigious-extern.rs
@@ -0,0 +1,11 @@
+//@ edition:2018
+//@ proc-macro: same-res-ambigious-extern-macro.rs
+
+#[macro_use] // this imports the `RustEmbed` macro with `pub(crate)` visibility
+extern crate same_res_ambigious_extern_macro;
+// this imports the same `RustEmbed` macro with `pub` visibility
+pub use same_res_ambigious_extern_macro::*;
+
+pub trait RustEmbed {}
+
+pub use RustEmbed as Embed;