Make impl
and !
removal suggestion short
This commit is contained in:
parent
692bc344d5
commit
c2b3287483
@ -1784,7 +1784,7 @@ pub(crate) struct ExpectedTraitInTraitImplFoundType {
|
||||
#[diag(parse_extra_impl_keyword_in_trait_impl)]
|
||||
pub(crate) struct ExtraImplKeywordInTraitImpl {
|
||||
#[primary_span]
|
||||
#[suggestion(code = "", applicability = "maybe-incorrect", style = "verbose")]
|
||||
#[suggestion(code = "", applicability = "maybe-incorrect", style = "short")]
|
||||
pub extra_impl_kw: Span,
|
||||
#[note]
|
||||
pub impl_trait_span: Span,
|
||||
@ -2890,7 +2890,7 @@ pub(crate) struct MacroRulesMissingBang {
|
||||
#[diag(parse_macro_name_remove_bang)]
|
||||
pub(crate) struct MacroNameRemoveBang {
|
||||
#[primary_span]
|
||||
#[suggestion(code = "", applicability = "machine-applicable", style = "verbose")]
|
||||
#[suggestion(code = "", applicability = "machine-applicable", style = "short")]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
|
@ -2,35 +2,25 @@ error: unexpected `impl` keyword
|
||||
--> $DIR/extra-impl-in-trait-impl.rs:8:18
|
||||
|
|
||||
LL | impl<T: Default> impl Default for S<T> {
|
||||
| ^^^^^
|
||||
| ^^^^^ help: remove the extra `impl`
|
||||
|
|
||||
note: this is parsed as an `impl Trait` type, but a trait is expected at this position
|
||||
--> $DIR/extra-impl-in-trait-impl.rs:8:18
|
||||
|
|
||||
LL | impl<T: Default> impl Default for S<T> {
|
||||
| ^^^^^^^^^^^^
|
||||
help: remove the extra `impl`
|
||||
|
|
||||
LL - impl<T: Default> impl Default for S<T> {
|
||||
LL + impl<T: Default> Default for S<T> {
|
||||
|
|
||||
|
||||
error: unexpected `impl` keyword
|
||||
--> $DIR/extra-impl-in-trait-impl.rs:14:6
|
||||
|
|
||||
LL | impl impl Default for S2 {
|
||||
| ^^^^^
|
||||
| ^^^^^ help: remove the extra `impl`
|
||||
|
|
||||
note: this is parsed as an `impl Trait` type, but a trait is expected at this position
|
||||
--> $DIR/extra-impl-in-trait-impl.rs:14:6
|
||||
|
|
||||
LL | impl impl Default for S2 {
|
||||
| ^^^^^^^^^^^^
|
||||
help: remove the extra `impl`
|
||||
|
|
||||
LL - impl impl Default for S2 {
|
||||
LL + impl Default for S2 {
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -2,13 +2,7 @@ error: macro names aren't followed by a `!`
|
||||
--> $DIR/bang-after-name.rs:4:17
|
||||
|
|
||||
LL | macro_rules! foo! {
|
||||
| ^
|
||||
|
|
||||
help: remove the `!`
|
||||
|
|
||||
LL - macro_rules! foo! {
|
||||
LL + macro_rules! foo {
|
||||
|
|
||||
| ^ help: remove the `!`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
@ -24,13 +24,7 @@ error: macro names aren't followed by a `!`
|
||||
--> $DIR/missing-bang-in-decl.rs:10:16
|
||||
|
|
||||
LL | macro_rules bar! {
|
||||
| ^
|
||||
|
|
||||
help: remove the `!`
|
||||
|
|
||||
LL - macro_rules bar! {
|
||||
LL + macro_rules bar {
|
||||
|
|
||||
| ^ help: remove the `!`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user