Fix attribute order implementation

This commit is contained in:
Jonathan Brouwer
2026-04-03 23:41:40 +02:00
parent 2972b5e59f
commit d88d64be5e
2 changed files with 8 additions and 8 deletions
@@ -159,9 +159,9 @@ impl<T: SingleAttributeParser<S>, S: Stage> AttributeParser<S> for Single<T, S>
if let Some(pa) = T::convert(cx, args) {
if let Some((_, used)) = group.1 {
T::ON_DUPLICATE.exec::<T>(cx, used, cx.attr_span);
} else {
group.1 = Some((pa, cx.attr_span));
}
group.1 = Some((pa, cx.attr_span));
}
},
)];
+6 -6
View File
@@ -101,10 +101,10 @@ LL | #![no_std(foo = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
note: attribute also specified here
--> $DIR/malformed-no-std.rs:5:1
--> $DIR/malformed-no-std.rs:3:1
|
LL | #![no_std("bar")]
| ^^^^^^^^^^^^^^^^^
LL | #![no_std = "foo"]
| ^^^^^^^^^^^^^^^^^^
warning: unused attribute
--> $DIR/malformed-no-std.rs:13:1
@@ -125,10 +125,10 @@ LL | #![no_core(foo = "bar")]
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
note: attribute also specified here
--> $DIR/malformed-no-std.rs:13:1
--> $DIR/malformed-no-std.rs:11:1
|
LL | #![no_core("bar")]
| ^^^^^^^^^^^^^^^^^^
LL | #![no_core = "foo"]
| ^^^^^^^^^^^^^^^^^^^
error: aborting due to 8 previous errors; 4 warnings emitted