diff options
| author | carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> | 2024-06-08 18:39:09 -0500 |
|---|---|---|
| committer | carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> | 2024-06-23 19:02:14 -0500 |
| commit | a23917cfd07b309f32603c6acb81b63aad8504e7 (patch) | |
| tree | 7ead8d9df7c78555088b9e034441f202ab30d94e /compiler/rustc_feature/src/builtin_attrs.rs | |
| parent | 33422e72c8a66bdb5ee21246a948a1a02ca91674 (diff) | |
| download | rust-a23917cfd07b309f32603c6acb81b63aad8504e7.tar.gz rust-a23917cfd07b309f32603c6acb81b63aad8504e7.zip | |
Add hard error and migration lint for unsafe attrs
Diffstat (limited to 'compiler/rustc_feature/src/builtin_attrs.rs')
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 9e2756f07ed..5e83e0d27e1 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -1145,10 +1145,6 @@ pub fn is_valid_for_get_attr(name: Symbol) -> bool { }) } -pub fn is_unsafe_attr(name: Symbol) -> bool { - BUILTIN_ATTRIBUTE_MAP.get(&name).is_some_and(|attr| attr.safety == AttributeSafety::Unsafe) -} - pub static BUILTIN_ATTRIBUTE_MAP: LazyLock<FxHashMap<Symbol, &BuiltinAttribute>> = LazyLock::new(|| { let mut map = FxHashMap::default(); |
