fix clippy::{redundant_guards, useless_format}
This commit is contained in:
parent
d4589a492f
commit
fd95627134
12 changed files with 16 additions and 21 deletions
|
@ -740,9 +740,7 @@ fn non_exhaustive_match<'p, 'tcx>(
|
|||
));
|
||||
}
|
||||
} else if ty == cx.tcx.types.str_ {
|
||||
err.note(format!(
|
||||
"`&str` cannot be matched exhaustively, so a wildcard `_` is necessary",
|
||||
));
|
||||
err.note("`&str` cannot be matched exhaustively, so a wildcard `_` is necessary");
|
||||
} else if cx.is_foreign_non_exhaustive_enum(ty) {
|
||||
err.note(format!("`{ty}` is marked as non-exhaustive, so a wildcard `_` is necessary to match exhaustively"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue