Skip to content

Commit 31948c4

Browse files
committed
Make #991 work with current rust
1 parent 0e3dcd1 commit 31948c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/functions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl Functions {
131131

132132
fn raw_ptr_arg(cx: &LateContext, arg: &hir::Arg) -> Option<hir::def_id::DefId> {
133133
if let (&hir::PatKind::Binding(_, _, _), &hir::TyPtr(_)) = (&arg.pat.node, &arg.ty.node) {
134-
cx.tcx.def_map.borrow().get(&arg.pat.id).map(hir::def::PathResolution::def_id)
134+
cx.tcx.def_map.borrow().get(&arg.pat.id).map(|pr| pr.full_def().def_id())
135135
} else {
136136
None
137137
}
@@ -175,7 +175,7 @@ impl<'a, 'tcx, 'v> hir::intravisit::Visitor<'v> for DerefVisitor<'a, 'tcx> {
175175
impl<'a, 'tcx: 'a> DerefVisitor<'a, 'tcx> {
176176
fn check_arg(&self, ptr: &hir::Expr) {
177177
if let Some(def) = self.cx.tcx.def_map.borrow().get(&ptr.id) {
178-
if self.ptrs.contains(&def.def_id()) {
178+
if self.ptrs.contains(&def.full_def().def_id()) {
179179
span_lint(self.cx,
180180
NOT_UNSAFE_PTR_ARG_DEREF,
181181
ptr.span,

0 commit comments

Comments
 (0)