librustc: Make monomorphic newtype structs work cross-crate
This commit is contained in:
parent
6016214101
commit
e07623d70b
12 changed files with 138 additions and 36 deletions
4
src/test/auxiliary/newtype_struct_xc.rs
Normal file
4
src/test/auxiliary/newtype_struct_xc.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#[crate_type="lib"];
|
||||
|
||||
pub struct Au(int);
|
||||
|
||||
14
src/test/run-pass/newtype-struct-xc-2.rs
Normal file
14
src/test/run-pass/newtype-struct-xc-2.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// xfail-fast
|
||||
// aux-build:newtype_struct_xc.rs
|
||||
|
||||
extern mod newtype_struct_xc;
|
||||
use newtype_struct_xc::Au;
|
||||
|
||||
fn f() -> Au {
|
||||
Au(2)
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _ = f();
|
||||
}
|
||||
|
||||
9
src/test/run-pass/newtype-struct-xc.rs
Normal file
9
src/test/run-pass/newtype-struct-xc.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// xfail-fast
|
||||
// aux-build:newtype_struct_xc.rs
|
||||
|
||||
extern mod newtype_struct_xc;
|
||||
|
||||
fn main() {
|
||||
let _ = newtype_struct_xc::Au(2);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue