about summary refs log tree commit diff
path: root/compiler/rustc_feature/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-09-22 08:11:17 +0200
committerRalf Jung <post@ralfj.de>2024-09-22 10:00:24 +0200
commit8103505a4d9bcef3eb5715a41cc0eb08d92c05d5 (patch)
treec70b2b75e7f1cb9650052c607aa6c6c205dc5e13 /compiler/rustc_feature/src
parentc0838c8ebec23fb87855bb6de3a287981cb1df98 (diff)
downloadrust-8103505a4d9bcef3eb5715a41cc0eb08d92c05d5.tar.gz
rust-8103505a4d9bcef3eb5715a41cc0eb08d92c05d5.zip
fix rustc_nonnull_optimization_guaranteed docs
Diffstat (limited to 'compiler/rustc_feature/src')
-rw-r--r--compiler/rustc_feature/src/builtin_attrs.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs
index 3b7e0d82d0f..edff6b1175c 100644
--- a/compiler/rustc_feature/src/builtin_attrs.rs
+++ b/compiler/rustc_feature/src/builtin_attrs.rs
@@ -863,8 +863,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
     rustc_attr!(
         rustc_nonnull_optimization_guaranteed, Normal, template!(Word), WarnFollowing,
         EncodeCrossCrate::Yes,
-        "the `#[rustc_nonnull_optimization_guaranteed]` attribute is just used to enable \
-        niche optimizations in libcore and libstd and will never be stable",
+        "the `#[rustc_nonnull_optimization_guaranteed]` attribute is just used to document \
+        guaranteed niche optimizations in libcore and libstd and will never be stable\n\
+        (note that the compiler does not even check whether the type indeed is being non-null-optimized; \
+        it is your responsibility to ensure that the attribute is only used on types that are optimized)",
     ),
 
     // ==========================================================================