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
This commit is contained in:
commit
21e488c00a
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue