librustc: Make monomorphic newtype structs work cross-crate

This commit is contained in:
Patrick Walton 2013-02-11 16:28:39 -08:00
parent 6016214101
commit e07623d70b
12 changed files with 138 additions and 36 deletions

View file

@ -0,0 +1,4 @@
#[crate_type="lib"];
pub struct Au(int);

View 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();
}

View 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);
}