Skip to content

Commit 7afbf18

Browse files
authored
Merge pull request #2523 from Centril/rfc/cfg-path-version
RFC: #[cfg(accessible(..) / version(..))]
2 parents 5074890 + e488a3a commit 7afbf18

File tree

3 files changed

+976
-0
lines changed

3 files changed

+976
-0
lines changed

text/1105-api-evolution.md

+10
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,16 @@ type parameter to `foo` can break code, even if a default is provided.
763763
This could be easily addressed by adding a notation like `...` to leave
764764
additional parameters unspecified: `foo::<T, ...>(x, y)`.
765765

766+
## [Amendment] Misuse of `accessible(..)`
767+
768+
[RFC 2523]: https://github.com/rust-lang/rfcs/blob/master/text/2523-cfg-path-version.md
769+
770+
[RFC 2523] introduces `#[cfg(accessible($path)]`. Based on the accessibility of
771+
a to-the-current-crate external `$path`, the flag allows conditional compilation.
772+
When combined with `#[cfg(feature = "unstable")]`, this has certain breakage risks.
773+
Such breakage due to misuse, as outlined in the RFC, is considered acceptable and
774+
not covered by our stability promises. Please see the RFC for more details.
775+
766776
# Drawbacks and Alternatives
767777

768778
The main drawback to the approach laid out here is that it makes the stability

text/1122-language-semver.md

+10
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,16 @@ future as well. The `-Z` flags are of course explicitly unstable, but
229229
some of the `-C`, rustdoc, and linker-specific flags are expected to
230230
evolve over time (see e.g. [#24451]).
231231

232+
## [Amendment] Misuse of `accessible(..)`
233+
234+
[RFC 2523]: https://github.com/rust-lang/rfcs/blob/master/text/2523-cfg-path-version.md
235+
236+
[RFC 2523] introduces `#[cfg(accessible($path)]`. Based on the accessibility of
237+
a to-the-current-crate external `$path`, the flag allows conditional compilation.
238+
When combined with `#[cfg(feature = "unstable")]`, this has certain breakage risks.
239+
Such breakage due to misuse, as outlined in the RFC, is considered acceptable and
240+
not covered by our stability promises. Please see the RFC for more details.
241+
232242
# Drawbacks
233243

234244
The primary drawback is that making breaking changes are disruptive,

0 commit comments

Comments
 (0)