Skip to content

Commit 64a9439

Browse files
committed
Fix borrow_as_ptr lint
1 parent b7c7964 commit 64a9439

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ used_underscore_binding = "allow"
8484
wildcard_imports = "allow"
8585

8686
# TODO
87-
borrow_as_ptr = "allow"
8887
match_same_arms = "allow"
8988
trivially_copy_pass_by_ref = "allow"
9089
needless_pass_by_value = "allow"

bindgen/clang.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ impl Cursor {
494494
where
495495
Visitor: FnMut(Cursor) -> CXChildVisitResult,
496496
{
497-
let data = &mut visitor as *mut Visitor;
497+
let data = ptr::addr_of_mut!(visitor);
498498
unsafe {
499499
clang_visitChildren(self.x, visit_children::<Visitor>, data.cast());
500500
}

0 commit comments

Comments
 (0)