Skip to content

Commit d890a6a

Browse files
committed
add future possibility for unstable dep behind cfg
1 parent b15595e commit d890a6a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

text/0000-build-std/5-standard-library-dependencies.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ files ([?][rationale-cargo-lock]).
177177
178178
*See the following sections for future possibilities:*
179179
180+
- [*Allow unstable crate names to be referenced behind cfgs without requiring nightly*][future-cfg-unstable-crate-name]
180181
- [*Allow `builtin` source replacement*][future-source-replacement]
181182
- [*Remove `rustc_dep_of_std`*][future-rustc_dep_of_std]
182183
@@ -931,6 +932,17 @@ would be desirable.
931932
932933
There are many possible follow-ups to this part of the RFC:
933934
935+
## Allow unstable crate names to be referenced behind cfgs without requiring nightly
936+
[future-cfg-unstable-crate-name]: #allow-unstable-crate-names-to-be-referenced-behind-cfgs-without-requiring-nightly
937+
938+
It is possible to allow builtin dependencies on unstable crate names to exist
939+
behind cfgs and for the crate to be compiled on a stable toolchain as long as
940+
the cfgs are not active. This is a trade-off - it adds a large constraint on
941+
when Cargo can validate the set of crate names, but would enable users to avoid
942+
using nightly or doing MSRV bumps.
943+
944+
↩ [*Proposal*][proposal]
945+
934946
## Allow `builtin` source replacement
935947
[future-source-replacement]: #allow-builtin-source-replacement
936948

0 commit comments

Comments
 (0)