If there are too many suggestions for malformed attribute, do not suggest them

This commit is contained in:
Guillaume Gomez 2025-12-12 14:47:28 +01:00
parent c4dc70ee0a
commit d025cdef7d
32 changed files with 19 additions and 1425 deletions

View file

@ -5,22 +5,6 @@ LL | #![doc(html_favicon_url)]
| ^^^^^^^----------------^^
| |
| expected this to be of the form `html_favicon_url = "..."`
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #![doc(html_favicon_url)]
LL + #![doc = "string"]
|
LL - #![doc(html_favicon_url)]
LL + #![doc(alias)]
|
LL - #![doc(html_favicon_url)]
LL + #![doc(attribute)]
|
LL - #![doc(html_favicon_url)]
LL + #![doc(auto_cfg)]
|
= and 21 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:6:1
@ -29,22 +13,6 @@ LL | #![doc(html_logo_url)]
| ^^^^^^^-------------^^
| |
| expected this to be of the form `html_logo_url = "..."`
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #![doc(html_logo_url)]
LL + #![doc = "string"]
|
LL - #![doc(html_logo_url)]
LL + #![doc(alias)]
|
LL - #![doc(html_logo_url)]
LL + #![doc(attribute)]
|
LL - #![doc(html_logo_url)]
LL + #![doc(auto_cfg)]
|
= and 21 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:9:1
@ -53,22 +21,6 @@ LL | #![doc(html_playground_url)]
| ^^^^^^^-------------------^^
| |
| expected this to be of the form `html_playground_url = "..."`
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #![doc(html_playground_url)]
LL + #![doc = "string"]
|
LL - #![doc(html_playground_url)]
LL + #![doc(alias)]
|
LL - #![doc(html_playground_url)]
LL + #![doc(attribute)]
|
LL - #![doc(html_playground_url)]
LL + #![doc(auto_cfg)]
|
= and 21 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:12:1
@ -77,22 +29,6 @@ LL | #![doc(issue_tracker_base_url)]
| ^^^^^^^----------------------^^
| |
| expected this to be of the form `issue_tracker_base_url = "..."`
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #![doc(issue_tracker_base_url)]
LL + #![doc = "string"]
|
LL - #![doc(issue_tracker_base_url)]
LL + #![doc(alias)]
|
LL - #![doc(issue_tracker_base_url)]
LL + #![doc(attribute)]
|
LL - #![doc(issue_tracker_base_url)]
LL + #![doc(auto_cfg)]
|
= and 21 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:15:1
@ -101,22 +37,6 @@ LL | #![doc(html_favicon_url = 1)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^-^^
| |
| expected a string literal here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #![doc(html_favicon_url = 1)]
LL + #![doc = "string"]
|
LL - #![doc(html_favicon_url = 1)]
LL + #![doc(alias)]
|
LL - #![doc(html_favicon_url = 1)]
LL + #![doc(attribute)]
|
LL - #![doc(html_favicon_url = 1)]
LL + #![doc(auto_cfg)]
|
= and 22 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:18:1
@ -125,22 +45,6 @@ LL | #![doc(html_logo_url = 2)]
| ^^^^^^^^^^^^^^^^^^^^^^^-^^
| |
| expected a string literal here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #![doc(html_logo_url = 2)]
LL + #![doc = "string"]
|
LL - #![doc(html_logo_url = 2)]
LL + #![doc(alias)]
|
LL - #![doc(html_logo_url = 2)]
LL + #![doc(attribute)]
|
LL - #![doc(html_logo_url = 2)]
LL + #![doc(auto_cfg)]
|
= and 22 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:21:1
@ -149,22 +53,6 @@ LL | #![doc(html_playground_url = 3)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^^
| |
| expected a string literal here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #![doc(html_playground_url = 3)]
LL + #![doc = "string"]
|
LL - #![doc(html_playground_url = 3)]
LL + #![doc(alias)]
|
LL - #![doc(html_playground_url = 3)]
LL + #![doc(attribute)]
|
LL - #![doc(html_playground_url = 3)]
LL + #![doc(auto_cfg)]
|
= and 22 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:24:1
@ -173,22 +61,6 @@ LL | #![doc(issue_tracker_base_url = 4)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^^
| |
| expected a string literal here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #![doc(issue_tracker_base_url = 4)]
LL + #![doc = "string"]
|
LL - #![doc(issue_tracker_base_url = 4)]
LL + #![doc(alias)]
|
LL - #![doc(issue_tracker_base_url = 4)]
LL + #![doc(attribute)]
|
LL - #![doc(issue_tracker_base_url = 4)]
LL + #![doc(auto_cfg)]
|
= and 22 other candidates
error[E0565]: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:27:1
@ -197,22 +69,6 @@ LL | #![doc(html_no_source = "asdf")]
| ^^^^^^^^^^^^^^^^^^^^^^--------^^
| |
| didn't expect any arguments here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #![doc(html_no_source = "asdf")]
LL + #![doc = "string"]
|
LL - #![doc(html_no_source = "asdf")]
LL + #![doc(alias)]
|
LL - #![doc(html_no_source = "asdf")]
LL + #![doc(attribute)]
|
LL - #![doc(html_no_source = "asdf")]
LL + #![doc(auto_cfg)]
|
= and 22 other candidates
error: aborting due to 9 previous errors

View file

@ -11,22 +11,6 @@ LL | #[doc(alias = 0)]
| ^^^^^^^^^^^^^^-^^
| |
| expected a string literal here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(alias = 0)]
LL + #[doc = "string"]
|
LL - #[doc(alias = 0)]
LL + #[doc(alias)]
|
LL - #[doc(alias = 0)]
LL + #[doc(attribute)]
|
LL - #[doc(alias = 0)]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error: '"' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:9:15
@ -79,22 +63,6 @@ LL | #[doc(alias(0))]
| ^^^^^^^^^^^^-^^^
| |
| expected a string literal here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(alias(0))]
LL + #[doc = "string"]
|
LL - #[doc(alias(0))]
LL + #[doc(alias)]
|
LL - #[doc(alias(0))]
LL + #[doc(attribute)]
|
LL - #[doc(alias(0))]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error: '"' character isn't allowed in `#[doc(alias = "...")]`
--> $DIR/check-doc-alias-attr.rs:20:13

View file

@ -5,22 +5,6 @@ LL | #[doc(cfg(), cfg(foo, bar))]
| ^^^^^^^^^--^^^^^^^^^^^^^^^^^
| |
| expected a single argument here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg(), cfg(foo, bar))]
LL + #[doc = "string"]
|
LL - #[doc(cfg(), cfg(foo, bar))]
LL + #[doc(alias)]
|
LL - #[doc(cfg(), cfg(foo, bar))]
LL + #[doc(attribute)]
|
LL - #[doc(cfg(), cfg(foo, bar))]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0805]: malformed `doc` attribute input
--> $DIR/doc-cfg.rs:3:1
@ -29,22 +13,6 @@ LL | #[doc(cfg(), cfg(foo, bar))]
| ^^^^^^^^^^^^^^^^----------^^
| |
| expected a single argument here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg(), cfg(foo, bar))]
LL + #[doc = "string"]
|
LL - #[doc(cfg(), cfg(foo, bar))]
LL + #[doc(alias)]
|
LL - #[doc(cfg(), cfg(foo, bar))]
LL + #[doc(attribute)]
|
LL - #[doc(cfg(), cfg(foo, bar))]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0805]: malformed `doc` attribute input
--> $DIR/doc-cfg.rs:6:1
@ -53,22 +21,6 @@ LL | #[doc(cfg())]
| ^^^^^^^^^--^^
| |
| expected a single argument here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg())]
LL + #[doc = "string"]
|
LL - #[doc(cfg())]
LL + #[doc(alias)]
|
LL - #[doc(cfg())]
LL + #[doc(attribute)]
|
LL - #[doc(cfg())]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0805]: malformed `doc` attribute input
--> $DIR/doc-cfg.rs:7:1
@ -77,22 +29,6 @@ LL | #[doc(cfg(foo, bar))]
| ^^^^^^^^^----------^^
| |
| expected a single argument here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg(foo, bar))]
LL + #[doc = "string"]
|
LL - #[doc(cfg(foo, bar))]
LL + #[doc(alias)]
|
LL - #[doc(cfg(foo, bar))]
LL + #[doc(attribute)]
|
LL - #[doc(cfg(foo, bar))]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/doc-cfg.rs:8:1
@ -101,22 +37,6 @@ LL | #[doc(auto_cfg(hide(foo::bar)))]
| ^^^^^^^^^^^^^^^^^^^^--------^^^^
| |
| expected a valid identifier here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(auto_cfg(hide(foo::bar)))]
LL + #[doc = "string"]
|
LL - #[doc(auto_cfg(hide(foo::bar)))]
LL + #[doc(alias)]
|
LL - #[doc(auto_cfg(hide(foo::bar)))]
LL + #[doc(attribute)]
|
LL - #[doc(auto_cfg(hide(foo::bar)))]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error: aborting due to 5 previous errors

View file

@ -3,22 +3,6 @@ error[E0539]: malformed `doc` attribute input
|
LL | #[doc(cfg = "x")]
| ^^^^^^^^^^^^^^^^^ expected this to be a list
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg = "x")]
LL + #[doc = "string"]
|
LL - #[doc(cfg = "x")]
LL + #[doc(alias)]
|
LL - #[doc(cfg = "x")]
LL + #[doc(attribute)]
|
LL - #[doc(cfg = "x")]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0805]: malformed `doc` attribute input
--> $DIR/invalid-cfg.rs:3:1
@ -27,44 +11,12 @@ LL | #[doc(cfg(x, y))]
| ^^^^^^^^^------^^
| |
| expected a single argument here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg(x, y))]
LL + #[doc = "string"]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(alias)]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(attribute)]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/invalid-cfg.rs:7:1
|
LL | #[doc(cfg = "x")]
| ^^^^^^^^^^^^^^^^^ expected this to be a list
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg = "x")]
LL + #[doc = "string"]
|
LL - #[doc(cfg = "x")]
LL + #[doc(alias)]
|
LL - #[doc(cfg = "x")]
LL + #[doc(attribute)]
|
LL - #[doc(cfg = "x")]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0805]: malformed `doc` attribute input
--> $DIR/invalid-cfg.rs:8:1
@ -73,44 +25,12 @@ LL | #[doc(cfg(x, y))]
| ^^^^^^^^^------^^
| |
| expected a single argument here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg(x, y))]
LL + #[doc = "string"]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(alias)]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(attribute)]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/invalid-cfg.rs:12:1
|
LL | #[doc(cfg = "x")]
| ^^^^^^^^^^^^^^^^^ expected this to be a list
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg = "x")]
LL + #[doc = "string"]
|
LL - #[doc(cfg = "x")]
LL + #[doc(alias)]
|
LL - #[doc(cfg = "x")]
LL + #[doc(attribute)]
|
LL - #[doc(cfg = "x")]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0805]: malformed `doc` attribute input
--> $DIR/invalid-cfg.rs:13:1
@ -119,44 +39,12 @@ LL | #[doc(cfg(x, y))]
| ^^^^^^^^^------^^
| |
| expected a single argument here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg(x, y))]
LL + #[doc = "string"]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(alias)]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(attribute)]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/invalid-cfg.rs:18:1
|
LL | #[doc(cfg = "x")]
| ^^^^^^^^^^^^^^^^^ expected this to be a list
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg = "x")]
LL + #[doc = "string"]
|
LL - #[doc(cfg = "x")]
LL + #[doc(alias)]
|
LL - #[doc(cfg = "x")]
LL + #[doc(attribute)]
|
LL - #[doc(cfg = "x")]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0805]: malformed `doc` attribute input
--> $DIR/invalid-cfg.rs:19:1
@ -165,22 +53,6 @@ LL | #[doc(cfg(x, y))]
| ^^^^^^^^^------^^
| |
| expected a single argument here
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(cfg(x, y))]
LL + #[doc = "string"]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(alias)]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(attribute)]
|
LL - #[doc(cfg(x, y))]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error: aborting due to 8 previous errors

View file

@ -5,22 +5,6 @@ LL | #[doc(123)]
| ^^^^^^---^^
| |
| expected this to be of the form `... = "..."`
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc(123)]
LL + #[doc = "string"]
|
LL - #[doc(123)]
LL + #[doc(alias)]
|
LL - #[doc(123)]
LL + #[doc(attribute)]
|
LL - #[doc(123)]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/doc-attr.rs:5:1
@ -29,22 +13,6 @@ LL | #[doc("hello", "bar")]
| ^^^^^^-------^^^^^^^^^
| |
| expected this to be of the form `... = "..."`
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc("hello", "bar")]
LL + #[doc = "string"]
|
LL - #[doc("hello", "bar")]
LL + #[doc(alias)]
|
LL - #[doc("hello", "bar")]
LL + #[doc(attribute)]
|
LL - #[doc("hello", "bar")]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error[E0539]: malformed `doc` attribute input
--> $DIR/doc-attr.rs:5:1
@ -53,22 +21,6 @@ LL | #[doc("hello", "bar")]
| ^^^^^^^^^^^^^^^-----^^
| |
| expected this to be of the form `... = "..."`
|
help: try changing it to one of the following valid forms of the attribute
|
LL - #[doc("hello", "bar")]
LL + #[doc = "string"]
|
LL - #[doc("hello", "bar")]
LL + #[doc(alias)]
|
LL - #[doc("hello", "bar")]
LL + #[doc(attribute)]
|
LL - #[doc("hello", "bar")]
LL + #[doc(auto_cfg)]
|
= and 22 other candidates
error: aborting due to 3 previous errors