diff options
| author | Oneirical <manchot@videotron.ca> | 2025-07-13 16:39:45 -0400 |
|---|---|---|
| committer | Oneirical <manchot@videotron.ca> | 2025-08-10 11:54:15 -0400 |
| commit | aa543963c68061d9ca46037071d66a028626ff3f (patch) | |
| tree | 2d6e7de7e1b2fe2176d81f48a456a05ef1b06dff /tests/ui/cross-crate | |
| parent | f8e355c230c6eb7b78ffce6a92fd81f78c890524 (diff) | |
| download | rust-aa543963c68061d9ca46037071d66a028626ff3f.tar.gz rust-aa543963c68061d9ca46037071d66a028626ff3f.zip | |
Rehome tests/ui/issues/ tests [4/?]
Diffstat (limited to 'tests/ui/cross-crate')
4 files changed, 43 insertions, 0 deletions
diff --git a/tests/ui/cross-crate/auxiliary/aux-9155.rs b/tests/ui/cross-crate/auxiliary/aux-9155.rs new file mode 100644 index 00000000000..049a96a655a --- /dev/null +++ b/tests/ui/cross-crate/auxiliary/aux-9155.rs @@ -0,0 +1,7 @@ +pub struct Foo<T>(T); + +impl<T> Foo<T> { + pub fn new(t: T) -> Foo<T> { + Foo(t) + } +} diff --git a/tests/ui/cross-crate/auxiliary/aux-9906.rs b/tests/ui/cross-crate/auxiliary/aux-9906.rs new file mode 100644 index 00000000000..8a3eea790a2 --- /dev/null +++ b/tests/ui/cross-crate/auxiliary/aux-9906.rs @@ -0,0 +1,15 @@ +pub use other::FooBar; +pub use other::foo; + +mod other { + pub struct FooBar{value: isize} + impl FooBar{ + pub fn new(val: isize) -> FooBar { + FooBar{value: val} + } + } + + pub fn foo(){ + 1+1; + } +} diff --git a/tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs b/tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs new file mode 100644 index 00000000000..35286615980 --- /dev/null +++ b/tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs @@ -0,0 +1,11 @@ +// https://github.com/rust-lang/rust/issues/9155 +//@ run-pass +//@ aux-build:aux-9155.rs + +extern crate aux_9155; + +struct Baz; + +pub fn main() { + aux_9155::Foo::new(Baz); +} diff --git a/tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs b/tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs new file mode 100644 index 00000000000..b49951bd1f9 --- /dev/null +++ b/tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs @@ -0,0 +1,10 @@ +// https://github.com/rust-lang/rust/issues/9906 +//@ run-pass +//@ aux-build:aux-9906.rs + +extern crate aux_9906 as testmod; + +pub fn main() { + testmod::foo(); + testmod::FooBar::new(1); +} |
