Skip to content

Commit d95359f

Browse files
nyurikemilio
authored andcommitted
Fix borrow_as_ptr lint
1 parent 43071a1 commit d95359f

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

8080
# TODO
81-
borrow_as_ptr = "allow"
8281
trivially_copy_pass_by_ref = "allow"
8382
unused_self = "allow"
8483

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)