Closed
Description
There is an example for using a leading ::
to reference the crate root:
https://doc.rust-lang.org/reference/paths.html#path-qualifiers
mod a {
pub fn foo() {}
}
mod b {
pub fn foo() {
::a::foo(); // call a's foo function
}
}
However, this no longer works on the 2018 edition.
It would be nice to have a comment explaining that this no longer is expected to work in the 2018 edition.
There is a note that says, "Beginning with the 2018 Edition, paths starting with ::
can only reference crates", so maybe this example could be changed to reference something in a crate, like ::std
or something.
Metadata
Metadata
Assignees
Labels
No labels