We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
borrow_as_ptr
1 parent b7c7964 commit 64a9439Copy full SHA for 64a9439
Cargo.toml
@@ -84,7 +84,6 @@ used_underscore_binding = "allow"
84
wildcard_imports = "allow"
85
86
# TODO
87
-borrow_as_ptr = "allow"
88
match_same_arms = "allow"
89
trivially_copy_pass_by_ref = "allow"
90
needless_pass_by_value = "allow"
bindgen/clang.rs
@@ -494,7 +494,7 @@ impl Cursor {
494
where
495
Visitor: FnMut(Cursor) -> CXChildVisitResult,
496
{
497
- let data = &mut visitor as *mut Visitor;
+ let data = ptr::addr_of_mut!(visitor);
498
unsafe {
499
clang_visitChildren(self.x, visit_children::<Visitor>, data.cast());
500
}
0 commit comments