Skip to content

Commit 21d3045

Browse files
committed
Don't import ty::Ref in cast_ref_to_mut lint
1 parent 6faf133 commit 21d3045

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/types.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use rustc::hir::intravisit::{walk_body, walk_expr, walk_ty, FnKind, NestedVisito
2525
use rustc::hir::*;
2626
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass};
2727
use rustc::ty::layout::LayoutOf;
28-
use rustc::ty::{self, Ref, Ty, TyCtxt, TypeckTables};
28+
use rustc::ty::{self, Ty, TyCtxt, TypeckTables};
2929
use rustc::{declare_tool_lint, lint_array};
3030
use rustc_errors::Applicability;
3131
use rustc_target::spec::abi::Abi;
@@ -2289,7 +2289,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RefToMut {
22892289
if let TyKind::Ptr(MutTy { mutbl: Mutability::MutMutable, .. }) = t.node;
22902290
if let ExprKind::Cast(e, t) = &e.node;
22912291
if let TyKind::Ptr(MutTy { mutbl: Mutability::MutImmutable, .. }) = t.node;
2292-
if let Ref(..) = cx.tables.node_id_to_type(e.hir_id).sty;
2292+
if let ty::Ref(..) = cx.tables.node_id_to_type(e.hir_id).sty;
22932293
then {
22942294
span_lint(
22952295
cx,

0 commit comments

Comments
 (0)