I’m a little confused why use statements in operate on absolute paths, whereas everything else uses relative paths. This is particularly noticeable when nesting modules…
mod foo {
mod bar {
use std::mem; // use can refer to crates using absolute paths without ::
fn func() -> usize {
::std::mem::size_of(f32); // but here we have to explicitly specify absolute path with ::
}
}
}
What is the rationale for these two cases having subtly different behaviour?