We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
given a modue testmod in src/testmod/ with this code
lib.rs
pub use other::FooBar; pub use other::foo; mod other;
other.rs
pub struct FooBar{value: int} impl FooBar{ pub fn new(val: int) -> FooBar { FooBar{value: val} } } pub fn foo(){ 1+1; }
and test.rs
extern mod testmod; #[test] fn create() { testmod::foo(); testmod::FooBar::new(1); }
running
rustc --lib src/testmod/lib.rs -o src/testmod/testmod && rustc --test src/testmod/test.rs -L src/testmod/
fails with
error: linking with `cc` failed with code 1 note: cc arguments: -L/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib -m64 -o src/testmod/test src/testmod/test.o -L/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib -lstd-6c65cf4b443341b1-0.9-pre -Lsrc/testmod -ltestmod-15fb3a718ea23983-0.0 -L/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib -lextra-a7c050cfd46b2c9a-0.9-pre -lrustrt -lrt -lpthread -Lsrc/testmod -L. -L/home/xandy/Projects/rusttest/.rust -L/home/xandy/Projects/rusttest -lrt -ldl -lm -lmorestack -lrustrt -Wl,-rpath,$ORIGIN/../../../../../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib -Wl,-rpath,$ORIGIN/. -Wl,-rpath,/usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib -Wl,-rpath,/home/xandy/Projects/rusttest/src/testmod note: src/testmod/test.o: In function `create::hbb4547578de7b860ai::v0.0': test.rc:(.text+0x41): undefined reference to `other::FooBar::new::h89aaf3c2942f8021LSaM::v0.0' collect2: error: ld returned 1 exit status error: aborting due to previous error task '<unnamed>' failed at 'explicit failure', /home/xandy/src/rust/src/libsyntax/diagnostic.rs:98 task '<unnamed>' failed at 'explicit failure', /home/xandy/src/rust/src/librustc/rustc.rs:391
if lib.rs has pub mod other; instead of mod other; it works. is this intended?
The text was updated successfully, but these errors were encountered:
a25bbcc
Auto merge of rust-lang#9996 - Jarcho:issue_9906, r=Alexendoo
846c9b8
Fix `unnecessary_cast` suggestion when taking a reference fixes rust-lang#9906 changelog: `unnecessary_cast`: Fix suggestion when taking a reference
No branches or pull requests
given a modue testmod in src/testmod/ with this code
lib.rs
other.rs
and test.rs
running
fails with
if lib.rs has pub mod other; instead of mod other; it works. is this intended?
The text was updated successfully, but these errors were encountered: