mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 23:20:39 +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(
|
} 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(
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue