mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 08:30:45 +00:00
removed ty_ptr match
This commit is contained in:
parent
b9414637e2
commit
5556d89f56
1 changed files with 3 additions and 6 deletions
|
@ -28,12 +28,9 @@ impl LintPass for MutMut {
|
||||||
cx.span_lint(MUT_MUT, expr.span,
|
cx.span_lint(MUT_MUT, expr.span,
|
||||||
"Generally you want to avoid &mut &mut _ if possible.")
|
"Generally you want to avoid &mut &mut _ if possible.")
|
||||||
} else {
|
} else {
|
||||||
match expr_ty(cx.tcx, e).sty {
|
if let ty_rptr(_, mt{ty: _, mutbl: MutMutable}) = expr_ty(cx.tcx, e).sty {
|
||||||
ty_ptr(mt{ty: _, mutbl: MutMutable}) |
|
cx.span_lint(MUT_MUT, expr.span,
|
||||||
ty_rptr(_, mt{ty: _, mutbl: MutMutable}) =>
|
"This expression mutably borrows a mutable reference. Consider reborrowing")
|
||||||
cx.span_lint(MUT_MUT, expr.span,
|
|
||||||
"This expression mutably borrows a mutable reference. Consider reborrowing"),
|
|
||||||
_ => ()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue