clarify the role of rustc_const_unstable
This commit is contained in:
parent
45e3b9d6b2
commit
7a37519254
|
|
@ -49,11 +49,11 @@ marks an item as stabilized. Note that stable functions may use unstable things
|
||||||
|
|
||||||
## rustc_const_unstable
|
## rustc_const_unstable
|
||||||
|
|
||||||
The `#[rustc_const_unstable(feature = "foo", issue = "1234", reason = "lorem ipsum")]`
|
The `#[rustc_const_unstable(feature = "foo", issue = "1234", reason = "lorem
|
||||||
has the same interface as the `unstable` attribute. It is used to mark
|
ipsum")]` has the same interface as the `unstable` attribute. It is used to mark
|
||||||
`const fn` as having their constness be unstable. This allows you to make a
|
`const fn` as having their constness be unstable. Every `const fn` with
|
||||||
function stable without stabilizing its constness or even just marking an existing
|
stability attributes should carry either this attribute or
|
||||||
stable function as `const fn` without instantly stabilizing the `const fn`ness.
|
`#[rustc_const_stable]` (see below).
|
||||||
|
|
||||||
Furthermore this attribute is needed to mark an intrinsic as `const fn`, because
|
Furthermore this attribute is needed to mark an intrinsic as `const fn`, because
|
||||||
there's no way to add `const` to functions in `extern` blocks for now.
|
there's no way to add `const` to functions in `extern` blocks for now.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue