Closed
Description
Assume we have rand = "0.6.1"
dependency in Cargo.toml. On Rust 2015 the following example works well
fn main() {
let _ = rand::thread_rng();
}
but the following doesn't.
use rand::thread_rng;
fn main() {
let _ = thread_rng();
}
On Rust 2018 both examples are totally ok (as expected).
Why do we need "extern crate rand" for the second case but not for the first? Are there any reasons for such inconsistency?
% rustc --version
rustc 1.31.0 (abe02cefd 2018-12-04)
Metadata
Metadata
Assignees
Labels
No labels