Rollup merge of #145238 - estebank:attr-overhaul, r=jdonszelmann
Tweak invalid builtin attribute output - Add link to reference/docs when possible - More accurate suggestions by supporting multiple alternative suggestions ``` error: malformed `crate_type` attribute input --> $DIR/crate-type-macro-call.rs:1:1 | LL | #![crate_type = foo!()] | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: for more information, visit <https://doc.rust-lang.org/reference/linkage.html> help: the following are the possible correct uses | LL - #![crate_type = foo!()] LL + #![crate_type = "bin"] | LL - #![crate_type = foo!()] LL + #![crate_type = "cdylib"] | LL - #![crate_type = foo!()] LL + #![crate_type = "dylib"] | LL - #![crate_type = foo!()] LL + #![crate_type = "lib"] | = and 4 other candidates ```
This commit is contained in:
commit
2dd72089d6
1 changed files with 2 additions and 0 deletions
|
|
@ -3,6 +3,8 @@ error: malformed `path` attribute input
|
|||
|
|
||||
LL | #[path = foo!()]
|
||||
| ^^^^^^^^^^^^^^^^ help: must be of the form: `#[path = "file"]`
|
||||
|
|
||||
= note: for more information, visit <https://doc.rust-lang.org/reference/items/modules.html#the-path-attribute>
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue