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 a3f877b commit 9c75729Copy full SHA for 9c75729
Cargo.toml
@@ -79,7 +79,6 @@ used_underscore_binding = "allow"
79
wildcard_imports = "allow"
80
81
# TODO
82
-borrow_as_ptr = "allow"
83
trivially_copy_pass_by_ref = "allow"
84
unused_self = "allow"
85
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