about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authordianne <diannes.gm@gmail.com>2024-09-16 20:20:46 -0700
committernora <48135649+Noratrieb@users.noreply.github.com>2024-09-24 19:53:17 +0200
commit9080dfe6ccaf358bb4ae0680cc4fdab0f67eeb9b (patch)
treee0215b1d8d66c8bbc931a89acbb893efff755861 /src/doc/rustc-dev-guide
parente1ff877fe4f569ca6a8e4d69506b3a67eafb8135 (diff)
downloadrust-9080dfe6ccaf358bb4ae0680cc4fdab0f67eeb9b.tar.gz
rust-9080dfe6ccaf358bb4ae0680cc4fdab0f67eeb9b.zip
Document `#[rustc_default_body_unstable]`
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/stability.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/stability.md b/src/doc/rustc-dev-guide/src/stability.md
index ac77ad3f1e3..444bef7af72 100644
--- a/src/doc/rustc-dev-guide/src/stability.md
+++ b/src/doc/rustc-dev-guide/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: