-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-HIRArea: The high-level intermediate representation (HIR)Area: The high-level intermediate representation (HIR)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Description
On the 2018 edition the following code:
extern crate some_crate as std; // or as core with #![no_std]
will:
Try to resolveprelude::v1::*
insome_crate
, failing if it doesn't exist. This probably limits the plausible cases where this could happen toextern crate core as std
, andextern crate core as std
with#![no_std]
.- Use
some_crate
inany built-in derives and forHIR lowering.
I would expect that the prelude and derives/HIR lowering to always use the injected std/core. Paths starting with std
should still resolve to the in the crate the user provided.
In the 2015 edition it creates a name conflict with the implicit extern crate std
.
Metadata
Metadata
Assignees
Labels
A-HIRArea: The high-level intermediate representation (HIR)Area: The high-level intermediate representation (HIR)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team