diff options
| author | Lzu Tao <taolzu@gmail.com> | 2019-12-21 18:38:45 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2019-12-21 18:38:45 +0000 |
| commit | d1ca5f1d7cb83793b729cfa5199a451594eec042 (patch) | |
| tree | ef3209543691cd324ad79e70d275799540ef287e /clippy_lints/src/mutable_debug_assertion.rs | |
| parent | 961c1a5df2aa20e92ee6a8f277f384fd4249366d (diff) | |
| download | rust-d1ca5f1d7cb83793b729cfa5199a451594eec042.tar.gz rust-d1ca5f1d7cb83793b729cfa5199a451594eec042.zip | |
rustup "Merge `ast::Mutability` and `mir::Mutability`"
Diffstat (limited to 'clippy_lints/src/mutable_debug_assertion.rs')
| -rw-r--r-- | clippy_lints/src/mutable_debug_assertion.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/mutable_debug_assertion.rs b/clippy_lints/src/mutable_debug_assertion.rs index 51180300e62..99815301010 100644 --- a/clippy_lints/src/mutable_debug_assertion.rs +++ b/clippy_lints/src/mutable_debug_assertion.rs @@ -129,7 +129,7 @@ impl<'a, 'tcx> MutArgVisitor<'a, 'tcx> { impl<'a, 'tcx> Visitor<'tcx> for MutArgVisitor<'a, 'tcx> { fn visit_expr(&mut self, expr: &'tcx Expr) { match expr.kind { - ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mutable, _) => { + ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, _) => { self.found = true; return; }, @@ -137,7 +137,7 @@ impl<'a, 'tcx> Visitor<'tcx> for MutArgVisitor<'a, 'tcx> { if let Some(adj) = self.cx.tables.adjustments().get(expr.hir_id) { if adj .iter() - .any(|a| matches!(a.target.kind, ty::Ref(_, _, Mutability::Mutable))) + .any(|a| matches!(a.target.kind, ty::Ref(_, _, Mutability::Mut))) { self.found = true; return; |
