mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
Reintroduce the lost (im)mutability checks
This commit is contained in:
parent
665cf96221
commit
39c0f575f2
3 changed files with 3 additions and 3 deletions
|
@ -73,7 +73,7 @@ impl<'a, 'tcx> intravisit::Visitor<'tcx> for MutVisitor<'a, 'tcx> {
|
|||
} else if let ty::TyRef(
|
||||
_,
|
||||
_,
|
||||
_,
|
||||
hir::MutMutable,
|
||||
) = self.cx.tables.expr_ty(e).sty
|
||||
{
|
||||
span_lint(
|
||||
|
|
|
@ -64,7 +64,7 @@ fn check_arguments<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, arguments: &[Expr], typ
|
|||
ty::TyRef(
|
||||
_,
|
||||
_,
|
||||
_,
|
||||
MutImmutable,
|
||||
) |
|
||||
ty::TyRawPtr(ty::TypeAndMut {
|
||||
mutbl: MutImmutable,
|
||||
|
|
|
@ -153,7 +153,7 @@ fn check_fn(cx: &LateContext, decl: &FnDecl, fn_id: NodeId, opt_body_id: Option<
|
|||
if let ty::TyRef(
|
||||
_,
|
||||
ty,
|
||||
_
|
||||
MutImmutable
|
||||
) = ty.sty
|
||||
{
|
||||
if match_type(cx, ty, &paths::VEC) {
|
||||
|
|
Loading…
Reference in a new issue