Closed
Description
With this feature extern crate NAME as RENAME;
now accepts NAME
=self
and interprets it as referring to the local crate.
As with other extern crate
items, RENAME
in this case gets into extern prelude and therefore can be used from absolute paths and imports on 2018 edition.
extern crate self as serde; // Adds local crate to extern prelude as `serde`
mod foo { ... }
// Anywhere in this crate
use serde::foo; // OK
::serde::foo; // OK
The feature's primary purpose is to resolve #54647 and support migration of proc macro crates to 2018 edition.
Implementation PR - #55275.