diff options
| author | Ralf Jung <post@ralfj.de> | 2019-08-25 10:22:14 +0200 |
|---|---|---|
| committer | Who? Me?! <mark-i-m@users.noreply.github.com> | 2019-08-25 11:40:28 -0500 |
| commit | cbe0ff44d6461a1974a93f033caa92af92a9f7ff (patch) | |
| tree | a96b1ad85af4f0b35334c1f3236c5cfefb711c79 /src/doc/rustc-dev-guide | |
| parent | 534ae0ad9c6c322b6f2bd81f65ef70e5876c0202 (diff) | |
| download | rust-cbe0ff44d6461a1974a93f033caa92af92a9f7ff.tar.gz rust-cbe0ff44d6461a1974a93f033caa92af92a9f7ff.zip | |
mention stable-in-unstable issue
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/stability.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/stability.md b/src/doc/rustc-dev-guide/src/stability.md index f35b1c08b99..46f62e52037 100644 --- a/src/doc/rustc-dev-guide/src/stability.md +++ b/src/doc/rustc-dev-guide/src/stability.md @@ -16,6 +16,13 @@ You can make specific sub-items stable by using the `#[stable]` attribute on the The stability scheme works similarly to how `pub` works. You can have public functions of nonpublic modules and you can have stable functions in unstable modules or vice versa. +Note, however, that due to a [rustc bug], stable items inside unstable modules +*are* available to stable code in that location! So, for example, stable code +can import `core::intrinsics::transmute` even though `intrinsics` is an unstable +module. Thus, this kind of nesting should be avoided when possible. + +[rustc bug]: https://github.com/rust-lang/rust/issues/15702 + # stable The `#[stable(feature = "foo", "since = "1.420.69")]` attribute explicitly marks an item as |
