diff options
| author | Ralf Jung <post@ralfj.de> | 2024-11-02 21:19:21 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-11-10 10:16:26 +0100 |
| commit | e96808162ad7ff5906d7b58d32a25abe139e998c (patch) | |
| tree | 039f785ca0af8ef506a8b07eac1e1e822ada4917 /compiler/rustc_expand/src/base.rs | |
| parent | 686eeb83e9c6d7f70848cdf84f490f5c1aa3edd3 (diff) | |
| download | rust-e96808162ad7ff5906d7b58d32a25abe139e998c.tar.gz rust-e96808162ad7ff5906d7b58d32a25abe139e998c.zip | |
ensure that all publicly reachable const fn have const stability info
Diffstat (limited to 'compiler/rustc_expand/src/base.rs')
| -rw-r--r-- | compiler/rustc_expand/src/base.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs index 7e4bc508e5c..bed500c3032 100644 --- a/compiler/rustc_expand/src/base.rs +++ b/compiler/rustc_expand/src/base.rs @@ -866,9 +866,7 @@ impl SyntaxExtension { }) .unwrap_or_else(|| (None, helper_attrs)); let stability = attr::find_stability(sess, attrs, span); - // We set `is_const_fn` false to avoid getting any implicit const stability. - let const_stability = - attr::find_const_stability(sess, attrs, span, /* is_const_fn */ false); + let const_stability = attr::find_const_stability(sess, attrs, span); let body_stability = attr::find_body_stability(sess, attrs); if let Some((_, sp)) = const_stability { sess.dcx().emit_err(errors::MacroConstStability { |
