You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compilation of the crate works fine, but linking against it causes an error:
machine> rustc cratey.rs
Running /Users/clements/rust/build/x86_64-apple-darwin/stage2/bin/rustc:
warning: no debug symbols in executable (-arch x86_64)
machine> rustc -L . crateuser.rs
Running /Users/clements/rust/build/x86_64-apple-darwin/stage2/bin/rustc:
crateuser.rs:6:4: 6:17 error: unresolved name
crateuser.rs:6 use cratey::add1;
^~~~~~~~~~~~~
crateuser.rs:6:4: 6:17 error: failed to resolve import: cratey::add1
crateuser.rs:6 use cratey::add1;
^~~~~~~~~~~~~
error: failed to resolve imports
error: aborting due to 3 previous errors
Removing the "mod mymod" wrapper allows the thing to compile fine. Apologies if this is the way it's supposed to work; casual stand-up-and-shout suggests to me that it should be possible to put an extern mod inside a module.
The text was updated successfully, but these errors were encountered:
I see... 'use' paths are relative to the crate root, and not to the current module. I've added a note (not yet pushed) to the documentation about this; hopefully this will prevent others from making this mistake.
…, r=matthiaskrgr
Fix a FP in `explicit_counter_loop`
Fixesrust-lang#4677 and rust-lang#6074
Fix a false positive in `explicit_counter_loop` where the loop counter is used after incremented, adjust the test so that counters are incremented at the end of the loop and add the test for this false positive.
---
changelog: Fix a false positive in `explicit_counter_loop` where the loop counter is used after incremented
It doesn't seem possible to use 'extern mod' inside of a module.
in file cratey.rs:
In the same directory, crateuser.rs:
compilation of the crate works fine, but linking against it causes an error:
Removing the "mod mymod" wrapper allows the thing to compile fine. Apologies if this is the way it's supposed to work; casual stand-up-and-shout suggests to me that it should be possible to put an extern mod inside a module.
The text was updated successfully, but these errors were encountered: