Skip to content

Commit

Permalink
Document #[rustc_default_body_unstable]
Browse files Browse the repository at this point in the history
  • Loading branch information
dianne committed Sep 17, 2024
1 parent 1c83da8 commit 75a1418
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/stability.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ even on an `unstable` function, if that function is called from another
Furthermore this attribute is needed to mark an intrinsic as callable from
`rustc_const_stable` functions.

## rustc_default_body_unstable

The `#[rustc_default_body_unstable(feature = "foo", issue = "1234", reason =
"lorem ipsum")]` attribute has the same interface as the `unstable` attribute.
It is used to mark the default implementation for an item within a trait as
unstable.
A trait with a default-body-unstable item can be implemented stably by providing
an explicit body for any such item, or the default body can be used by enabling
its corresponding `#![feature]`.

## Stabilizing a library feature

To stabilize a feature, follow these steps:
Expand Down

0 comments on commit 75a1418

Please sign in to comment.