Skip to content

Commit 4fa05b6

Browse files
dianneNoratrieb
authored andcommitted
Document #[rustc_default_body_unstable]
1 parent 2a67e13 commit 4fa05b6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/stability.md

+10
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ even on an `unstable` function, if that function is called from another
6868
Furthermore this attribute is needed to mark an intrinsic as callable from
6969
`rustc_const_stable` functions.
7070

71+
## rustc_default_body_unstable
72+
73+
The `#[rustc_default_body_unstable(feature = "foo", issue = "1234", reason =
74+
"lorem ipsum")]` attribute has the same interface as the `unstable` attribute.
75+
It is used to mark the default implementation for an item within a trait as
76+
unstable.
77+
A trait with a default-body-unstable item can be implemented stably by providing
78+
an explicit body for any such item, or the default body can be used by enabling
79+
its corresponding `#![feature]`.
80+
7181
## Stabilizing a library feature
7282

7383
To stabilize a feature, follow these steps:

0 commit comments

Comments
 (0)