Skip to content

Commit 9c75729

Browse files
committed
Fix borrow_as_ptr lint
1 parent a3f877b commit 9c75729

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
@@ -79,7 +79,6 @@ used_underscore_binding = "allow"
7979
wildcard_imports = "allow"
8080

8181
# TODO
82-
borrow_as_ptr = "allow"
8382
trivially_copy_pass_by_ref = "allow"
8483
unused_self = "allow"
8584

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)