Skip to content

Commit 39c0f57

Browse files
committed
Reintroduce the lost (im)mutability checks
1 parent 665cf96 commit 39c0f57

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clippy_lints/src/mut_mut.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl<'a, 'tcx> intravisit::Visitor<'tcx> for MutVisitor<'a, 'tcx> {
7373
} else if let ty::TyRef(
7474
_,
7575
_,
76-
_,
76+
hir::MutMutable,
7777
) = self.cx.tables.expr_ty(e).sty
7878
{
7979
span_lint(

clippy_lints/src/mut_reference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn check_arguments<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, arguments: &[Expr], typ
6464
ty::TyRef(
6565
_,
6666
_,
67-
_,
67+
MutImmutable,
6868
) |
6969
ty::TyRawPtr(ty::TypeAndMut {
7070
mutbl: MutImmutable,

clippy_lints/src/ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ fn check_fn(cx: &LateContext, decl: &FnDecl, fn_id: NodeId, opt_body_id: Option<
153153
if let ty::TyRef(
154154
_,
155155
ty,
156-
_
156+
MutImmutable
157157
) = ty.sty
158158
{
159159
if match_type(cx, ty, &paths::VEC) {

0 commit comments

Comments
 (0)