I have a real hankering to use some BigInt
and BigUInt
, but I'm getting some odd behavior when trying to import num
as a dependency in a larger library.
My module starts like this:
extern crate core;
extern crate num;
use std::io;
use num::bigint;
I made sure to include num
as a dependency as well.
[package]
name = "name"
version = "0.1.0"
authors = ["authors"]
[[bin]]
name = "main"
doc = false
[dependencies]
num = "*"
...and the error I'm receiving in console is:
../blah.rs:4:5: 4:8 error: unresolved import `num::bigint`. Did you mean `self::num`? [E0432]
../blah.rs:4 use num::bigint;
^~~
Having declared num
as a dependency, this was odd, so I made another project just to try what I believe to be the same thing, to see if the issue was exclusive to my current project.
I spun up another cargo project and wrote out the import in the same manner:
extern crate num;
use num::bigint;
fn main() {
println!("Hello, world!");
}
...with .toml:
[package]
name = "num_test"
version = "0.1.0"
authors = ["authors"]
[dependencies]
num = "*"
...and it builds with no errors!
I'm at a slight loss here, but I'm pretty sure I could have overlooked something since I'm pretty new to Rust. I've also manually deleted num
and re-built a couple times to no avail. Has anyone else had this problem?