Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more suggestions in template for bad attribute use #61288

Open
estebank opened this issue May 28, 2019 · 0 comments
Open

Support more suggestions in template for bad attribute use #61288

estebank opened this issue May 28, 2019 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`. C-enhancement Category: An issue proposing an enhancement or a PR with one. D-papercut Diagnostics: An error or lint that needs small tweaks. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@estebank
Copy link
Contributor

Modify

pub struct AttributeTemplate {
word: bool,
list: Option<&'static str>,
name_value_str: Option<&'static str>,
}

to allow for multiple suggestions of the same type.

The following

error: malformed `crate_type` attribute input
--> $DIR/no_crate_type.rs:2:1
|
LL | #![crate_type]
| ^^^^^^^^^^^^^^ help: must be of the form: `#[crate_type = "bin|lib|..."]`

should be

error: malformed `crate_type` attribute input
  --> $DIR/no_crate_type.rs:2:1
   |
LL | #![crate_type]
   | ^^^^^^^^^^^^^^ malformed input
help: must be of the form:
   |
LL | #![crate_type = "bin"]
   |
LL | #![crate_type = "lib"]
   |
LL | #![crate_type = "..."]
   |
@estebank estebank added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-diagnostics Area: Messages for errors, warnings, and lints P-low Low priority A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`. labels May 28, 2019
@estebank estebank added the D-papercut Diagnostics: An error or lint that needs small tweaks. label Oct 5, 2019
@estebank estebank added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`. C-enhancement Category: An issue proposing an enhancement or a PR with one. D-papercut Diagnostics: An error or lint that needs small tweaks. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant