Last active
December 17, 2015 00:39
-
-
Save thomaslee/5522568 to your computer and use it in GitHub Desktop.
Updated reproduction of the issue described in Rust issue #4202
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern mod foo; | |
use foo::Foo; | |
use foo::Bar; | |
fn main() { | |
assert!(42 == Bar::bar()); | |
assert!(42 == Foo::foo()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[link(name = "foo", vers = "0.1")]; | |
#[crate_type = "lib"]; | |
pub use sub_foo::Foo; | |
pub trait Bar { | |
pub fn bar() -> Self; | |
} | |
impl Bar for int { | |
pub fn bar() -> int { 42 } | |
} | |
mod sub_foo { | |
pub trait Foo { | |
pub fn foo() -> Self; | |
} | |
impl Foo for int { | |
pub fn foo() -> int { 42 } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment