about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
diff options
context:
space:
mode:
authorPavel Grigorenko <GrigorenkoPV@ya.ru>2025-06-24 01:10:12 +0300
committerPavel Grigorenko <GrigorenkoPV@ya.ru>2025-07-07 14:59:01 +0300
commit5d7771e50d1ed3f4174269c78f06691596e632d3 (patch)
tree2eb6f44e1386a54d23c0e59e1f6a778e53522da1 /compiler/rustc_passes/src
parent99a9fe1b22edd82697a315e67392bfb35690152d (diff)
downloadrust-5d7771e50d1ed3f4174269c78f06691596e632d3.tar.gz
rust-5d7771e50d1ed3f4174269c78f06691596e632d3.zip
Port `#[ffi_pure]` to the new attribute system
Diffstat (limited to 'compiler/rustc_passes/src')
-rw-r--r--compiler/rustc_passes/src/check_attr.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index 8a59b07a4f3..32e21c99f06 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -210,6 +210,9 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                 &Attribute::Parsed(AttributeKind::FfiConst(attr_span)) => {
                     self.check_ffi_const(attr_span, target)
                 }
+                &Attribute::Parsed(AttributeKind::FfiPure(attr_span)) => {
+                    self.check_ffi_pure(attr_span, attrs, target)
+                }
                 Attribute::Parsed(
                     AttributeKind::BodyStability { .. }
                     | AttributeKind::ConstStabilityIndirect
@@ -306,7 +309,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
                         [sym::rustc_has_incoherent_inherent_impls, ..] => {
                             self.check_has_incoherent_inherent_impls(attr, span, target)
                         }
-                        [sym::ffi_pure, ..] => self.check_ffi_pure(attr.span(), attrs, target),
                         [sym::link_ordinal, ..] => self.check_link_ordinal(attr, span, target),
                         [sym::link, ..] => self.check_link(hir_id, attr, span, target),
                         [sym::macro_use, ..] | [sym::macro_escape, ..] => {