diff options
Diffstat (limited to 'tests/ui/compiletest-self-test')
| -rw-r--r-- | tests/ui/compiletest-self-test/aux-aux.rs | 14 | ||||
| -rw-r--r-- | tests/ui/compiletest-self-test/auxiliary/aux_aux_bar.rs | 3 | ||||
| -rw-r--r-- | tests/ui/compiletest-self-test/auxiliary/aux_aux_foo.rs | 4 |
3 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/compiletest-self-test/aux-aux.rs b/tests/ui/compiletest-self-test/aux-aux.rs new file mode 100644 index 00000000000..c87905ff775 --- /dev/null +++ b/tests/ui/compiletest-self-test/aux-aux.rs @@ -0,0 +1,14 @@ +//@ aux-crate: aux_aux_foo=aux_aux_foo.rs +//@ aux-crate: aux_aux_bar=aux_aux_bar.rs +//@ edition: 2021 +//@ compile-flags: --crate-type lib +//@ check-pass + +use aux_aux_foo::Bar as IndirectBar; +use aux_aux_bar::Bar as DirectBar; + +fn foo(x: IndirectBar) {} + +fn main() { + foo(DirectBar); +} diff --git a/tests/ui/compiletest-self-test/auxiliary/aux_aux_bar.rs b/tests/ui/compiletest-self-test/auxiliary/aux_aux_bar.rs new file mode 100644 index 00000000000..eefcc270c38 --- /dev/null +++ b/tests/ui/compiletest-self-test/auxiliary/aux_aux_bar.rs @@ -0,0 +1,3 @@ +//@ edition: 2021 + +pub struct Bar; diff --git a/tests/ui/compiletest-self-test/auxiliary/aux_aux_foo.rs b/tests/ui/compiletest-self-test/auxiliary/aux_aux_foo.rs new file mode 100644 index 00000000000..f96c6bb0b27 --- /dev/null +++ b/tests/ui/compiletest-self-test/auxiliary/aux_aux_foo.rs @@ -0,0 +1,4 @@ +//@ aux-crate: aux_aux_bar=aux_aux_bar.rs +//@ edition: 2021 + +pub use aux_aux_bar::Bar; |
