These are chat archives for rust-lang/rust
use std? Since std is implicitly injected in the code?
extern crate std;at the root of your crate (unless you specify
std::io::readlineif you're in the crate root. Inside a submodule you'd have to refer to it as
::std::io::readline, because paths are relative to the current module
usestatements which are relative to the crate root
::? What do they mean?
::at the beginning of a path refers to the root of your crate
use foo;statements are relative to the crate root by default so
use ::foo;is always equivalent to
fooanywhere else is relative to the current module, so if you want it from the crate root you have to be explicit by referring to it as