diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-08-06 15:55:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-06 15:55:43 +0200 |
| commit | 21e488c00a302945751f90086d71cd961352cf56 (patch) | |
| tree | 60c45068ae733fe190f9b3a6a1611695bbf57e3c | |
| parent | e89ae47b978f50b6fc1873d65486d661520bdf28 (diff) | |
| parent | 712c28e8324fc507c986f982755b8bfde919b5dc (diff) | |
| download | rust-21e488c00a302945751f90086d71cd961352cf56.tar.gz rust-21e488c00a302945751f90086d71cd961352cf56.zip | |
Rollup merge of #144676 - tiif:dev_guide_unstable_bound, r=BoxyUwU
Add documentation for unstable_feature_bound There is more detail and explanation in https://hackmd.io/``````@tiif/Byd3mq7Ige`````` Original PR that implemented this: rust-lang/rust#140399 r? ``````@BoxyUwU`````` to nominate for types team discussion
| -rw-r--r-- | src/doc/rustc-dev-guide/src/stability.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/stability.md b/src/doc/rustc-dev-guide/src/stability.md index d0cee54adb6..c26d34273d7 100644 --- a/src/doc/rustc-dev-guide/src/stability.md +++ b/src/doc/rustc-dev-guide/src/stability.md @@ -181,4 +181,7 @@ the `deprecated_in_future` lint is triggered which is default `allow`, but most of the standard library raises it to a warning with `#![warn(deprecated_in_future)]`. +## unstable_feature_bound +The `#[unstable_feature_bound(foo)]` attribute can be used together with `#[unstable]` attribute to mark an `impl` of stable type and stable trait as unstable. In std/core, an item annotated with `#[unstable_feature_bound(foo)]` can only be used by another item that is also annotated with `#[unstable_feature_bound(foo)]`. Outside of std/core, using an item with `#[unstable_feature_bound(foo)]` requires the feature to be enabled with `#![feature(foo)]` attribute on the crate. Currently, only `impl`s and free functions can be annotated with `#[unstable_feature_bound]`. + [blog]: https://www.ralfj.de/blog/2018/07/19/const.html |
