about summary refs log tree commit diff
path: root/compiler/rustc_expand/src/config.rs
diff options
context:
space:
mode:
authorcarbotaniuman <41451839+carbotaniuman@users.noreply.github.com>2024-07-09 19:06:49 -0500
committercarbotaniuman <41451839+carbotaniuman@users.noreply.github.com>2024-07-30 18:28:43 -0500
commit49db8a5a999f0908b5bf74b88a2d72a4f4dddf48 (patch)
treea080b5f39b3e923e2a2057102cf88362757f316c /compiler/rustc_expand/src/config.rs
parentd8bc8761a5bb8456c0b7940434b3b3b4f0ed035c (diff)
downloadrust-49db8a5a999f0908b5bf74b88a2d72a4f4dddf48.tar.gz
rust-49db8a5a999f0908b5bf74b88a2d72a4f4dddf48.zip
Add toggle for `parse_meta_item` unsafe parsing
This makes it possible for the `unsafe(...)` syntax to only be
valid at the top level, and the `NestedMetaItem`s will automatically
reject `unsafe(...)`.
Diffstat (limited to 'compiler/rustc_expand/src/config.rs')
-rw-r--r--compiler/rustc_expand/src/config.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_expand/src/config.rs b/compiler/rustc_expand/src/config.rs
index d46ec7a9ac0..f6bf9f5e89f 100644
--- a/compiler/rustc_expand/src/config.rs
+++ b/compiler/rustc_expand/src/config.rs
@@ -8,7 +8,9 @@ use rustc_ast::tokenstream::{
 use rustc_ast::{self as ast, AttrStyle, Attribute, HasAttrs, HasTokens, MetaItem, NodeId};
 use rustc_attr as attr;
 use rustc_data_structures::flat_map_in_place::FlatMapInPlace;
-use rustc_feature::{AttributeSafety, Features, ACCEPTED_FEATURES, REMOVED_FEATURES, UNSTABLE_FEATURES};
+use rustc_feature::{
+    AttributeSafety, Features, ACCEPTED_FEATURES, REMOVED_FEATURES, UNSTABLE_FEATURES,
+};
 use rustc_lint_defs::BuiltinLintDiag;
 use rustc_parse::validate_attr;
 use rustc_session::parse::feature_err;