Merge commit '371120bdbf' into clippyup
This commit is contained in:
parent
8518391e72
commit
7e9abb311d
152 changed files with 2226 additions and 440 deletions
|
|
@ -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! {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue