-
-
Save dotdash/1f45130c7580087dc56e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#![crate_type="lib"] | |
extern crate base; | |
pub fn foo() -> base::E { | |
base::E::A(0) | |
} |
This file contains hidden or 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
#![crate_type="lib"] | |
extern crate base; | |
pub fn bar() -> base::E { | |
base::E::A(0) | |
} |
This file contains hidden or 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
#![crate_type="lib"] | |
pub enum E { | |
A(i32), | |
B(i32) | |
} |
This file contains hidden or 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
#![crate_type="staticlib"] | |
extern crate a; | |
extern crate b; | |
pub use a::foo; | |
pub use b::bar; |
This file contains hidden or 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
rustc -g base.rs | |
rustc -g -L. a.rs | |
rustc -g -L. b.rs | |
rustc -g -L. -Clto c.rs |
Accidently copied base.rs
contents for a.rs
, fixed.
Result on Mac OS X:
% ./x86_64-apple-darwin/stage2/bin/rustc -g -L. -Clto /tmp/issue_26447/c.rs
note: link against the following native artifacts when linking against this static library
note: the order and any duplication can be significant on some platforms, and so may need to be preserved
note: library: System
note: library: pthread
note: library: c
note: library: m
(but the original bug was a run time failure... so ... am I supposed to run something here... ?)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a::foo
inc.rs
? Is that a typo?