Fix duplicate errors for link_section, rustc_layout_scalar_valid_range_start and rustc_layout_scalar_valid_range_end
This commit is contained in:
@@ -305,6 +305,9 @@ fn emit_malformed_attribute(
|
|||||||
| sym::link_name
|
| sym::link_name
|
||||||
| sym::export_name
|
| sym::export_name
|
||||||
| sym::rustc_macro_transparency
|
| sym::rustc_macro_transparency
|
||||||
|
| sym::link_section
|
||||||
|
| sym::rustc_layout_scalar_valid_range_start
|
||||||
|
| sym::rustc_layout_scalar_valid_range_end
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,12 +52,6 @@ error: malformed `export_stable` attribute input
|
|||||||
LL | #[export_stable = 1]
|
LL | #[export_stable = 1]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[export_stable]`
|
| ^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[export_stable]`
|
||||||
|
|
||||||
error: malformed `link_section` attribute input
|
|
||||||
--> $DIR/malformed-attrs.rs:86:1
|
|
||||||
|
|
|
||||||
LL | #[link_section]
|
|
||||||
| ^^^^^^^^^^^^^^^ help: must be of the form: `#[link_section = "name"]`
|
|
||||||
|
|
||||||
error: malformed `coverage` attribute input
|
error: malformed `coverage` attribute input
|
||||||
--> $DIR/malformed-attrs.rs:88:1
|
--> $DIR/malformed-attrs.rs:88:1
|
||||||
|
|
|
|
||||||
@@ -119,18 +113,6 @@ error: malformed `proc_macro_derive` attribute input
|
|||||||
LL | #[proc_macro_derive]
|
LL | #[proc_macro_derive]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
|
| ^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
|
||||||
|
|
||||||
error: malformed `rustc_layout_scalar_valid_range_start` attribute input
|
|
||||||
--> $DIR/malformed-attrs.rs:126:1
|
|
||||||
|
|
|
||||||
LL | #[rustc_layout_scalar_valid_range_start]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_layout_scalar_valid_range_start(value)]`
|
|
||||||
|
|
||||||
error: malformed `rustc_layout_scalar_valid_range_end` attribute input
|
|
||||||
--> $DIR/malformed-attrs.rs:128:1
|
|
||||||
|
|
|
||||||
LL | #[rustc_layout_scalar_valid_range_end]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_layout_scalar_valid_range_end(value)]`
|
|
||||||
|
|
||||||
error: malformed `must_not_suspend` attribute input
|
error: malformed `must_not_suspend` attribute input
|
||||||
--> $DIR/malformed-attrs.rs:130:1
|
--> $DIR/malformed-attrs.rs:130:1
|
||||||
|
|
|
|
||||||
@@ -523,6 +505,12 @@ error[E0539]: malformed `link_name` attribute input
|
|||||||
LL | #[link_name]
|
LL | #[link_name]
|
||||||
| ^^^^^^^^^^^^ help: must be of the form: `#[link_name = "name"]`
|
| ^^^^^^^^^^^^ help: must be of the form: `#[link_name = "name"]`
|
||||||
|
|
||||||
|
error[E0539]: malformed `link_section` attribute input
|
||||||
|
--> $DIR/malformed-attrs.rs:86:1
|
||||||
|
|
|
||||||
|
LL | #[link_section]
|
||||||
|
| ^^^^^^^^^^^^^^^ help: must be of the form: `#[link_section = "name"]`
|
||||||
|
|
||||||
error[E0539]: malformed `must_use` attribute input
|
error[E0539]: malformed `must_use` attribute input
|
||||||
--> $DIR/malformed-attrs.rs:117:1
|
--> $DIR/malformed-attrs.rs:117:1
|
||||||
|
|
|
|
||||||
@@ -540,6 +528,24 @@ LL - #[must_use = 1]
|
|||||||
LL + #[must_use]
|
LL + #[must_use]
|
||||||
|
|
|
|
||||||
|
|
||||||
|
error[E0539]: malformed `rustc_layout_scalar_valid_range_start` attribute input
|
||||||
|
--> $DIR/malformed-attrs.rs:126:1
|
||||||
|
|
|
||||||
|
LL | #[rustc_layout_scalar_valid_range_start]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
| |
|
||||||
|
| expected this to be a list
|
||||||
|
| help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]`
|
||||||
|
|
||||||
|
error[E0539]: malformed `rustc_layout_scalar_valid_range_end` attribute input
|
||||||
|
--> $DIR/malformed-attrs.rs:128:1
|
||||||
|
|
|
||||||
|
LL | #[rustc_layout_scalar_valid_range_end]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
| |
|
||||||
|
| expected this to be a list
|
||||||
|
| help: must be of the form: `#[rustc_layout_scalar_valid_range_end(end)]`
|
||||||
|
|
||||||
warning: `#[diagnostic::do_not_recommend]` does not expect any arguments
|
warning: `#[diagnostic::do_not_recommend]` does not expect any arguments
|
||||||
--> $DIR/malformed-attrs.rs:147:1
|
--> $DIR/malformed-attrs.rs:147:1
|
||||||
|
|
|
|
||||||
|
|||||||
@@ -167,6 +167,16 @@ LL - #[must_use = "string"suffix]
|
|||||||
LL + #[must_use]
|
LL + #[must_use]
|
||||||
|
|
|
|
||||||
|
|
||||||
error: aborting due to 21 previous errors; 2 warnings emitted
|
error[E0805]: malformed `rustc_layout_scalar_valid_range_start` attribute input
|
||||||
|
--> $DIR/bad-lit-suffixes.rs:43:1
|
||||||
|
|
|
||||||
|
LL | #[rustc_layout_scalar_valid_range_start(0suffix)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------^
|
||||||
|
| | |
|
||||||
|
| | expected a single argument here
|
||||||
|
| help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]`
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0539`.
|
error: aborting due to 22 previous errors; 2 warnings emitted
|
||||||
|
|
||||||
|
Some errors have detailed explanations: E0539, E0805.
|
||||||
|
For more information about an error, try `rustc --explain E0539`.
|
||||||
|
|||||||
Reference in New Issue
Block a user