Skip to content

Tracking issue for feature extern_crate_self #56409

Closed
@petrochenkov

Description

@petrochenkov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions