From 75a14185437c0cd8fd71349ed4f4b4a6a2e24207 Mon Sep 17 00:00:00 2001 From: dianne Date: Mon, 16 Sep 2024 20:20:46 -0700 Subject: [PATCH] Document `#[rustc_default_body_unstable]` --- src/stability.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/stability.md b/src/stability.md index ac77ad3f1..444bef7af 100644 --- a/src/stability.md +++ b/src/stability.md @@ -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: