Skip to content

Commit 66c5c7c

Browse files
Fix #[rustc_macro_transparency] giving two errors
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
1 parent 928c776 commit 66c5c7c

File tree

3 files changed

+69
-75
lines changed

3 files changed

+69
-75
lines changed

compiler/rustc_parse/src/validate_attr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ fn emit_malformed_attribute(
303303
| sym::must_use
304304
| sym::track_caller
305305
| sym::export_name
306+
| sym::rustc_macro_transparency
306307
) {
307308
return;
308309
}

tests/ui/attributes/malformed-attrs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
//~| WARN this was previously accepted by the compiler
4545
#[rustc_macro_transparency]
4646
//~^ ERROR malformed
47-
//~| ERROR malformed
4847
#[repr]
4948
//~^ ERROR malformed
5049
#[rustc_as_ptr = 5]

0 commit comments

Comments
 (0)