Skip to content

Support more suggestions in template for bad attribute use #61288

Open
@estebank

Description

@estebank

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 = "..."]
   |

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions