Skip to content

Commit

Permalink
Merge pull request #2523 from Centril/rfc/cfg-path-version
Browse files Browse the repository at this point in the history
RFC: #[cfg(accessible(..) / version(..))]
  • Loading branch information
Centril committed Sep 26, 2019
2 parents 5074890 + e488a3a commit 7afbf18
Show file tree
Hide file tree
Showing 3 changed files with 976 additions and 0 deletions.
10 changes: 10 additions & 0 deletions text/1105-api-evolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,16 @@ type parameter to `foo` can break code, even if a default is provided.
This could be easily addressed by adding a notation like `...` to leave
additional parameters unspecified: `foo::<T, ...>(x, y)`.

## [Amendment] Misuse of `accessible(..)`

[RFC 2523]: https://github.com/rust-lang/rfcs/blob/master/text/2523-cfg-path-version.md

[RFC 2523] introduces `#[cfg(accessible($path)]`. Based on the accessibility of
a to-the-current-crate external `$path`, the flag allows conditional compilation.
When combined with `#[cfg(feature = "unstable")]`, this has certain breakage risks.
Such breakage due to misuse, as outlined in the RFC, is considered acceptable and
not covered by our stability promises. Please see the RFC for more details.

# Drawbacks and Alternatives

The main drawback to the approach laid out here is that it makes the stability
Expand Down
10 changes: 10 additions & 0 deletions text/1122-language-semver.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@ future as well. The `-Z` flags are of course explicitly unstable, but
some of the `-C`, rustdoc, and linker-specific flags are expected to
evolve over time (see e.g. [#24451]).

## [Amendment] Misuse of `accessible(..)`

[RFC 2523]: https://github.com/rust-lang/rfcs/blob/master/text/2523-cfg-path-version.md

[RFC 2523] introduces `#[cfg(accessible($path)]`. Based on the accessibility of
a to-the-current-crate external `$path`, the flag allows conditional compilation.
When combined with `#[cfg(feature = "unstable")]`, this has certain breakage risks.
Such breakage due to misuse, as outlined in the RFC, is considered acceptable and
not covered by our stability promises. Please see the RFC for more details.

# Drawbacks

The primary drawback is that making breaking changes are disruptive,
Expand Down
Loading

0 comments on commit 7afbf18

Please sign in to comment.