mention rustc's stable-through-unstable bug being fixed

This commit is contained in:
dianne 2024-09-16 18:51:30 -07:00 committed by nora
parent 4040f38175
commit a1c37098dc
1 changed files with 6 additions and 4 deletions

View File

@ -30,10 +30,11 @@ them. The stability scheme works similarly to how `pub` works. You can have
public functions of nonpublic modules and you can have stable functions in public functions of nonpublic modules and you can have stable functions in
unstable modules or vice versa. unstable modules or vice versa.
Note, however, that due to a [rustc bug], stable items inside unstable modules Previously, due to a [rustc bug], stable items inside unstable modules were
*are* available to stable code in that location! So, for example, stable code available to stable code in that location.
can import `core::intrinsics::transmute` even though `intrinsics` is an As of <!-- date-check --> September 2024, items with [accidentally stabilized
unstable module. Thus, this kind of nesting should be avoided when possible. paths] are marked with the `#[rustc_allowed_through_unstable_modules]` attribute
to prevent code dependent on those paths from breaking.
The `unstable` attribute may also have the `soft` value, which makes it a The `unstable` attribute may also have the `soft` value, which makes it a
future-incompatible deny-by-default lint instead of a hard error. This is used future-incompatible deny-by-default lint instead of a hard error. This is used
@ -42,6 +43,7 @@ prevents breaking dependencies by leveraging Cargo's lint capping.
[issue number]: https://github.com/rust-lang/rust/issues [issue number]: https://github.com/rust-lang/rust/issues
[rustc bug]: https://github.com/rust-lang/rust/issues/15702 [rustc bug]: https://github.com/rust-lang/rust/issues/15702
[accidentally stabilized paths]: https://github.com/rust-lang/rust/issues/113387
## stable ## stable
The `#[stable(feature = "foo", since = "1.420.69")]` attribute explicitly The `#[stable(feature = "foo", since = "1.420.69")]` attribute explicitly