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 43071a1 commit d95359fCopy full SHA for d95359f
Cargo.toml
@@ -78,7 +78,6 @@ used_underscore_binding = "allow"
78
wildcard_imports = "allow"
79
80
# TODO
81
-borrow_as_ptr = "allow"
82
trivially_copy_pass_by_ref = "allow"
83
unused_self = "allow"
84
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