Skip to content

Commit 42dbe47

Browse files
committed
is_unsafe_ptr -> is_raw_ptr
With rust-lang/rust#135994, `rustc_middle::Ty::is_unsafe_ptr` is now called `rustc_middle::Ty::is_raw_ptr`.
1 parent eeb5608 commit 42dbe47

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/detector/memory/use_after_free.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl<'tcx> UseAfterFreeDetector<'tcx> {
7878
body.local_decls
7979
.iter_enumerated()
8080
.filter_map(|(local, local_decl)| {
81-
if local_decl.ty.is_unsafe_ptr() {
81+
if local_decl.ty.is_raw_ptr() {
8282
Some(local)
8383
} else {
8484
None
@@ -122,7 +122,7 @@ fn collect_raw_ptrs_escape_to_global<'tcx>(
122122
.flat_map(|(ptr, ptes)| ptes.iter().map(|pte| (pte, ptr.clone())))
123123
.filter_map(|(pte, ptr)| match pte {
124124
ConstraintNode::Alloc(place)
125-
if place.local < local_end && place.ty(body, tcx).ty.is_unsafe_ptr() =>
125+
if place.local < local_end && place.ty(body, tcx).ty.is_raw_ptr() =>
126126
{
127127
Some((ConstraintNode::Place(*place), ptr))
128128
}
@@ -195,7 +195,7 @@ fn detect_escape_to_return_or_param<'tcx>(
195195
alias_with_params.push(pte)
196196
} else if pte.local < local_end
197197
&& pte.projection.is_empty()
198-
&& pte.ty(body, tcx).ty.is_unsafe_ptr()
198+
&& pte.ty(body, tcx).ty.is_raw_ptr()
199199
{
200200
alias_with_raw_ptrs.push(pte)
201201
}

0 commit comments

Comments
 (0)