about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-08-01 10:40:45 +0000
committerbors <bors@rust-lang.org>2024-08-01 10:40:45 +0000
commitc0e32983f5b06a6f7d8cc776ccac71de6512ed6d (patch)
tree17ac1f5467de5a238885792e929b0e6500b38dfc /compiler/rustc_parse/src/errors.rs
parent97ac52f579fe1003a162324d448dad43a942b5f5 (diff)
parent49db8a5a999f0908b5bf74b88a2d72a4f4dddf48 (diff)
downloadrust-c0e32983f5b06a6f7d8cc776ccac71de6512ed6d.tar.gz
rust-c0e32983f5b06a6f7d8cc776ccac71de6512ed6d.zip
Auto merge of #127543 - carbotaniuman:more_unsafe_attr_verification, r=estebank,traviscross
More unsafe attr verification

This code denies unsafe on attributes such as `#[test]` and `#[ignore]`, while also changing the `MetaItem` parsing so `unsafe` in args like `#[allow(unsafe(dead_code))]` is not accidentally allowed.

Tracking:

- https://github.com/rust-lang/rust/issues/123757
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
-rw-r--r--compiler/rustc_parse/src/errors.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs
index c5e7e0df631..99f2f26b8cb 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -3183,6 +3183,7 @@ pub(crate) struct DotDotRangeAttribute {
 #[note]
 pub struct InvalidAttrUnsafe {
     #[primary_span]
+    #[label]
     pub span: Span,
     pub name: Path,
 }