Skip to content

Commit 86b54d5

Browse files
Fix double error for export_name
Signed-off-by: Jonathan Brouwer <[email protected]>
1 parent 0fcf295 commit 86b54d5

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
@@ -303,6 +303,7 @@ fn emit_malformed_attribute(
303303
| sym::must_use
304304
| sym::track_caller
305305
| sym::link_name
306+
| sym::export_name
306307
) {
307308
return;
308309
}

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)