Skip to content

Commit ec40ee4

Browse files
committed
Add documentation for unstable_feature_bound
1 parent 72716b1 commit ec40ee4

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
@@ -183,4 +183,7 @@ the `deprecated_in_future` lint is triggered which is default `allow`, but most
183183
of the standard library raises it to a warning with
184184
`#![warn(deprecated_in_future)]`.
185185

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

0 commit comments

Comments
 (0)