Closed
Description
(commented-keywords below are copied over from original bug report.)
foo.rs
#[link(name = "foo",
vers = "0.1")];
#[crate_type = "lib"];
pub use sub_foo::Foo;
mod sub_foo {
pub trait Foo {
/*static*/ /*pub*/ fn foo() -> Self;
}
/*pub*/ impl Foo for int {
/*static*/ /*pub*/ fn foo() -> int { 42 }
}
}
bar.rs
extern mod foo;
use foo::Foo;
fn main() {
assert!(42 == Foo::foo());
}
$ rustc --out-dir . src/foo.rs
warning: no debug symbols in executable (-arch x86_64)
$ rustc --out-dir . src/bar.rs -L .
src/bar.rs:5:17: 5:25 error: unresolved name
src/bar.rs:5 assert 42 == Foo::foo();
^~~~~~~~
src/bar.rs:5:17: 5:25 error: use of undeclared module `Foo`
src/bar.rs:5 assert 42 == Foo::foo();
^~~~~~~~
src/bar.rs:5:17: 5:25 error: unresolved name: Foo::foo
src/bar.rs:5 assert 42 == Foo::foo();
^~~~~~~~
error: aborting due to 3 previous errors