mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Fix attribute order implementation
This commit is contained in:
@@ -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));
|
||||
}
|
||||
},
|
||||
)];
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user