Closed
Description
cargo new mycrate
Add to Cargo.toml
:
[dependencies]
num = "*"
Make empty x.rs
file: touch mycrate/src/x.rs
Contents of mycrate/src/lib.rs
:
extern crate num;
use num as num_export;
use self::x::*;
$ cargo build
Compiling issue v0.1.0 (file:///home/stephen/Desktop/rust/issue)
src/lib.rs:2:5: 2:22 error: unresolved import (maybe you meant `num as num_export::*`?)
src/lib.rs:2 use num as num_export;
^~~~~~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `issue`.
To learn more, run the command again with --verbose.
Try removing the use self::x::*;
line and everything will work just fine.
- OS: Ubuntu 15.04 (beta)
rustc --version
:rustc 1.1.0 (35ceea399 2015-06-19)