Skip to content

Commit 0b4f4c5

Browse files
Rollup merge of rust-lang#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#140399 r? `@BoxyUwU` to nominate for types team discussion
2 parents 638494f + 712c28e commit 0b4f4c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/doc/rustc-dev-guide/src/stability.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,7 @@ the `deprecated_in_future` lint is triggered which is default `allow`, but most
181181
of the standard library raises it to a warning with
182182
`#![warn(deprecated_in_future)]`.
183183

184+
## unstable_feature_bound
185+
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]`.
186+
184187
[blog]: https://www.ralfj.de/blog/2018/07/19/const.html

0 commit comments

Comments
 (0)