Point to previous applicability when declared multiple times
This commit is contained in:
parent
ec85a1b263
commit
efb20bc855
3 changed files with 19 additions and 26 deletions
|
|
@ -436,7 +436,7 @@ struct ErrorWithNoteCustomWrongOrder {
|
|||
#[diag(typeck::ambiguous_lifetime_bound, code = "E0123")]
|
||||
struct ApplicabilityInBoth {
|
||||
#[suggestion(typeck::suggestion, code = "...", applicability = "maybe-incorrect")]
|
||||
//~^ ERROR applicability cannot be set in both the field and attribute
|
||||
//~^ ERROR specified multiple times
|
||||
suggestion: (Span, Applicability),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -293,11 +293,17 @@ error: `#[label = ...]` is not a valid attribute
|
|||
LL | #[label = "bar"]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
error: applicability cannot be set in both the field and attribute
|
||||
error: specified multiple times
|
||||
--> $DIR/diagnostic-derive.rs:438:52
|
||||
|
|
||||
LL | #[suggestion(typeck::suggestion, code = "...", applicability = "maybe-incorrect")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: previously specified here
|
||||
--> $DIR/diagnostic-derive.rs:440:24
|
||||
|
|
||||
LL | suggestion: (Span, Applicability),
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: invalid applicability
|
||||
--> $DIR/diagnostic-derive.rs:446:52
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue