Skip to content

Commit c87ace7

Browse files
Fix double error for export_name
Signed-off-by: Jonathan Brouwer <[email protected]>
1 parent 7deda8d commit c87ace7

File tree

3 files changed

+75
-88
lines changed

3 files changed

+75
-88
lines changed

compiler/rustc_parse/src/validate_attr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ fn emit_malformed_attribute(
302302
| sym::no_mangle
303303
| sym::must_use
304304
| sym::track_caller
305+
| sym::export_name
305306
) {
306307
return;
307308
}

tests/ui/attributes/malformed-attrs.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
#[unsafe(export_name)]
3333
//~^ ERROR malformed
34-
//~| ERROR malformed
3534
#[rustc_allow_const_fn_unstable]
3635
//~^ ERROR `rustc_allow_const_fn_unstable` expects a list of feature names
3736
#[allow_internal_unstable]
@@ -69,7 +68,6 @@
6968
//~^ ERROR malformed
7069
#[export_name()]
7170
//~^ ERROR malformed
72-
//~| ERROR malformed
7371
#[used()]
7472
//~^ ERROR malformed
7573
#[crate_name]

0 commit comments

Comments
 (0)