diff options
| author | Konrad Borowski <konrad@borowski.pw> | 2018-12-30 13:12:28 +0100 |
|---|---|---|
| committer | Konrad Borowski <konrad@borowski.pw> | 2019-01-07 14:37:28 +0100 |
| commit | 21d30450b51adf206626aacf6fe0abf52a7b4ec5 (patch) | |
| tree | 3f3cd68ff8b7126822101eaf53925d0e3d32a8c8 | |
| parent | 6faf1330aaa42f9f524b7f84a881111a536ca10d (diff) | |
| download | rust-21d30450b51adf206626aacf6fe0abf52a7b4ec5.tar.gz rust-21d30450b51adf206626aacf6fe0abf52a7b4ec5.zip | |
Don't import ty::Ref in cast_ref_to_mut lint
| -rw-r--r-- | clippy_lints/src/types.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index a9fb595e708..3acc82edf29 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -25,7 +25,7 @@ use rustc::hir::intravisit::{walk_body, walk_expr, walk_ty, FnKind, NestedVisito use rustc::hir::*; use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass}; use rustc::ty::layout::LayoutOf; -use rustc::ty::{self, Ref, Ty, TyCtxt, TypeckTables}; +use rustc::ty::{self, Ty, TyCtxt, TypeckTables}; use rustc::{declare_tool_lint, lint_array}; use rustc_errors::Applicability; use rustc_target::spec::abi::Abi; @@ -2289,7 +2289,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RefToMut { if let TyKind::Ptr(MutTy { mutbl: Mutability::MutMutable, .. }) = t.node; if let ExprKind::Cast(e, t) = &e.node; if let TyKind::Ptr(MutTy { mutbl: Mutability::MutImmutable, .. }) = t.node; - if let Ref(..) = cx.tables.node_id_to_type(e.hir_id).sty; + if let ty::Ref(..) = cx.tables.node_id_to_type(e.hir_id).sty; then { span_lint( cx, |
