diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-06-16 14:31:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-16 14:31:13 +0200 |
| commit | dc1668282478095cbf85146e333ba45ad6aae20c (patch) | |
| tree | 170809b2524fe3dafbd9b4c9886dd2f2820eb645 | |
| parent | 2c4abc0f453a32a5f8cca4f7aa40d38649949691 (diff) | |
| parent | a0db28f37c85a8a42e2eaf9144cebc3dc9c13875 (diff) | |
| download | rust-dc1668282478095cbf85146e333ba45ad6aae20c.tar.gz rust-dc1668282478095cbf85146e333ba45ad6aae20c.zip | |
Rollup merge of #142528 - fee1-dead-contrib:push-rlxklunqkwmv, r=RalfJung
clarify `rustc_do_not_const_check` comment ~~Given that we have used this attribute for other reasons before it seems appropriate to make this a "usually".~~ Add function name as a pointer cc ```@rust-lang/wg-const-eval```
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 2 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/crates/hir-expand/src/inert_attr_macro.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 73a21789c5d..7d6e471e7e9 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -887,7 +887,7 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ rustc_legacy_const_generics, Normal, template!(List: "N"), ErrorFollowing, EncodeCrossCrate::Yes, ), - // Do not const-check this function's body. It will always get replaced during CTFE. + // Do not const-check this function's body. It will always get replaced during CTFE via `hook_special_const_fn`. rustc_attr!( rustc_do_not_const_check, Normal, template!(Word), WarnFollowing, EncodeCrossCrate::Yes, "`#[rustc_do_not_const_check]` skips const-check for this function's body", diff --git a/src/tools/rust-analyzer/crates/hir-expand/src/inert_attr_macro.rs b/src/tools/rust-analyzer/crates/hir-expand/src/inert_attr_macro.rs index 543ac0619dd..385c98ef877 100644 --- a/src/tools/rust-analyzer/crates/hir-expand/src/inert_attr_macro.rs +++ b/src/tools/rust-analyzer/crates/hir-expand/src/inert_attr_macro.rs @@ -486,7 +486,7 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[ rustc_legacy_const_generics, Normal, template!(List: "N"), ErrorFollowing, INTERNAL_UNSTABLE ), - // Do not const-check this function's body. It will always get replaced during CTFE. + // Do not const-check this function's body. It will always get replaced during CTFE via `hook_special_const_fn`. rustc_attr!( rustc_do_not_const_check, Normal, template!(Word), WarnFollowing, INTERNAL_UNSTABLE ), |
