Reintroduce the lost (im)mutability checks

This commit is contained in:
Oliver Schneider 2018-05-11 09:50:29 +02:00
parent 665cf96221
commit 39c0f575f2
No known key found for this signature in database
GPG key ID: 1D5CB4FC597C3004
3 changed files with 3 additions and 3 deletions

View file

@ -73,7 +73,7 @@ impl<'a, 'tcx> intravisit::Visitor<'tcx> for MutVisitor<'a, 'tcx> {
} else if let ty::TyRef( } else if let ty::TyRef(
_, _,
_, _,
_, hir::MutMutable,
) = self.cx.tables.expr_ty(e).sty ) = self.cx.tables.expr_ty(e).sty
{ {
span_lint( span_lint(

View file

@ -64,7 +64,7 @@ fn check_arguments<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, arguments: &[Expr], typ
ty::TyRef( ty::TyRef(
_, _,
_, _,
_, MutImmutable,
) | ) |
ty::TyRawPtr(ty::TypeAndMut { ty::TyRawPtr(ty::TypeAndMut {
mutbl: MutImmutable, mutbl: MutImmutable,

View file

@ -153,7 +153,7 @@ fn check_fn(cx: &LateContext, decl: &FnDecl, fn_id: NodeId, opt_body_id: Option<
if let ty::TyRef( if let ty::TyRef(
_, _,
ty, ty,
_ MutImmutable
) = ty.sty ) = ty.sty
{ {
if match_type(cx, ty, &paths::VEC) { if match_type(cx, ty, &paths::VEC) {