On the 2018 edition the following code:
extern crate some_crate as std; // or as core with #![no_std]
will:
Try to resolve prelude::v1::* in some_crate, failing if it doesn't exist. This probably limits the plausible cases where this could happen to extern crate core as std, and extern crate core as std with #![no_std].
- Use
some_crate in any built-in derives and for HIR 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.
cc @petrochenkov @eddyb
On the 2018 edition the following code:
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 stdwith#![no_std].some_crateinany 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
stdshould 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.cc @petrochenkov @eddyb