Skip to content

Commit ec77cdd

Browse files
dianneNoratrieb
authored andcommitted
mention rustc's stable-through-unstable bug being fixed
1 parent b65af7c commit ec77cdd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/stability.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ them. The stability scheme works similarly to how `pub` works. You can have
3030
public functions of nonpublic modules and you can have stable functions in
3131
unstable modules or vice versa.
3232

33-
Note, however, that due to a [rustc bug], stable items inside unstable modules
34-
*are* available to stable code in that location! So, for example, stable code
35-
can import `core::intrinsics::transmute` even though `intrinsics` is an
36-
unstable module. Thus, this kind of nesting should be avoided when possible.
33+
Previously, due to a [rustc bug], stable items inside unstable modules were
34+
available to stable code in that location.
35+
As of <!-- date-check --> September 2024, items with [accidentally stabilized
36+
paths] are marked with the `#[rustc_allowed_through_unstable_modules]` attribute
37+
to prevent code dependent on those paths from breaking.
3738

3839
The `unstable` attribute may also have the `soft` value, which makes it a
3940
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.
4243

4344
[issue number]: https://github.com/rust-lang/rust/issues
4445
[rustc bug]: https://github.com/rust-lang/rust/issues/15702
46+
[accidentally stabilized paths]: https://github.com/rust-lang/rust/issues/113387
4547

4648
## stable
4749
The `#[stable(feature = "foo", since = "1.420.69")]` attribute explicitly

0 commit comments

Comments
 (0)