Merge commit '371120bdbf' into clippyup

This commit is contained in:
Philipp Krones 2023-05-05 17:45:49 +02:00
parent 8518391e72
commit 7e9abb311d
152 changed files with 2226 additions and 440 deletions

View file

@ -638,7 +638,7 @@ declare_clippy_lint! {
#[clippy::version = "1.66.0"]
pub AS_PTR_CAST_MUT,
nursery,
"casting the result of the `&self`-taking `as_ptr` to a mutabe pointer"
"casting the result of the `&self`-taking `as_ptr` to a mutable pointer"
}
declare_clippy_lint! {

View file

@ -141,9 +141,9 @@ fn lint_unnecessary_cast(
fn get_numeric_literal<'e>(expr: &'e Expr<'e>) -> Option<&'e Lit> {
match expr.kind {
ExprKind::Lit(ref lit) => Some(lit),
ExprKind::Lit(lit) => Some(lit),
ExprKind::Unary(UnOp::Neg, e) => {
if let ExprKind::Lit(ref lit) = e.kind {
if let ExprKind::Lit(lit) = e.kind {
Some(lit)
} else {
None