diff options
| author | Ralf Jung <post@ralfj.de> | 2024-11-01 22:19:42 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-11-04 23:27:45 +0100 |
| commit | 10723c28964d582814ea8e07dbd8fa7367e0eaee (patch) | |
| tree | 425157ebf9ee29e2fed5476e5bbbc4d5f4579c6c /compiler/rustc_attr/src/builtin.rs | |
| parent | 7934f26613980e2dfed24551e816601b8a74879b (diff) | |
| download | rust-10723c28964d582814ea8e07dbd8fa7367e0eaee.tar.gz rust-10723c28964d582814ea8e07dbd8fa7367e0eaee.zip | |
remove support for extern-block const intrinsics
Diffstat (limited to 'compiler/rustc_attr/src/builtin.rs')
| -rw-r--r-- | compiler/rustc_attr/src/builtin.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_attr/src/builtin.rs b/compiler/rustc_attr/src/builtin.rs index 6af75bc94bb..2753ac529d1 100644 --- a/compiler/rustc_attr/src/builtin.rs +++ b/compiler/rustc_attr/src/builtin.rs @@ -273,8 +273,7 @@ pub fn find_stability( /// Collects stability info from `rustc_const_stable`/`rustc_const_unstable`/`rustc_promotable` /// attributes in `attrs`. Returns `None` if no stability attributes are found. /// -/// `is_const_fn` indicates whether this is a function marked as `const`. It will always -/// be false for intrinsics in an `extern` block! +/// `is_const_fn` indicates whether this is a function marked as `const`. pub fn find_const_stability( sess: &Session, attrs: &[Attribute], @@ -330,7 +329,7 @@ pub fn find_const_stability( } } - // Merge promotable and not_exposed_on_stable into stability info + // Merge promotable and const_stable_indirect into stability info if promotable { match &mut const_stab { Some((stab, _)) => stab.promotable = promotable, @@ -352,10 +351,7 @@ pub fn find_const_stability( }) } } - _ => { - // We ignore the `#[rustc_const_stable_indirect]` here, it should be picked up by - // the `default_const_unstable` logic. - } + _ => {} } } // Make sure if `const_stable_indirect` is present, that is recorded. Also make sure all `const |
