Can some one explain me why some struct, like Box
or AsRef
can be use without a path or a use directive ? Bref why can I write this and does not get a compiler error
fn main() ->
let x = Box::new(1);
}
But this does not work
fn main() -> {
let p = Path::new("/something");
}
This really bug me for days and I can't find any response anywhere.