@@ -99,12 +99,12 @@ default `allow`, but most of the standard library raises it to a warning with
9999## -Zforce-unstable-if-unmarked
100100
101101The ` -Zforce-unstable-if-unmarked ` flag has a variety of purposes to help
102- enforce that the correct crates are marked as unstable, but can still use
103- private crates without special attributes. It was introduced primarily to
104- allow rustc and the standard library to link to arbitrary crates on crates.io
105- which do not themselves use ` staged_api ` . ` rustc ` also relies on this flag to
106- mark all of its crates as unstable with the ` rustc_private ` feature so that
107- each crate does not need to be carefully marked with ` unstable ` .
102+ enforce that the correct crates are marked as unstable. It was introduced
103+ primarily to allow rustc and the standard library to link to arbitrary crates
104+ on crates.io which do not themselves use ` staged_api ` . ` rustc ` also relies on
105+ this flag to mark all of its crates as unstable with the ` rustc_private `
106+ feature so that each crate does not need to be carefully marked with
107+ ` unstable ` .
108108
109109This flag is automatically applied to all of ` rustc ` and the standard library
110110by the bootstrap scripts. This is needed because the compiler and all of its
@@ -115,7 +115,11 @@ This flag has the following effects:
115115- Marks the crate as "unstable" with the ` rustc_private ` feature if it is not
116116 itself marked as stable or unstable.
117117- Allows these crates to access other forced-unstable crates without any need
118- for attributes.
118+ for attributes. Normally a crate would need a ` #![feature(rustc_private)] `
119+ attribute to use other unstable crates. However, that would make it
120+ impossible for a crate from crates.io to access its own dependencies since
121+ that crate won't have a ` feature(rustc_private) ` attribute, but * everything*
122+ is compiled with ` -Zforce-unstable-if-unmarked ` .
119123
120124Code which does not use ` -Zforce-unstable-if-unmarked ` should include the
121125` #![feature(rustc_private)] ` crate attribute to access these force-unstable
0 commit comments