We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3cc55c1 + 21a85a1 commit cbc76a2Copy full SHA for cbc76a2
rust/kernel/types.rs
@@ -128,6 +128,22 @@ impl<T: PointerWrapper + Deref> PointerWrapper for Pin<T> {
128
}
129
130
131
+impl<T> PointerWrapper for *mut T {
132
+ type Borrowed<'a> = *mut T;
133
+
134
+ fn into_pointer(self) -> *const c_types::c_void {
135
+ self as _
136
+ }
137
138
+ unsafe fn borrow<'a>(ptr: *const c_types::c_void) -> Self::Borrowed<'a> {
139
+ ptr as _
140
141
142
+ unsafe fn from_pointer(ptr: *const c_types::c_void) -> Self {
143
144
145
+}
146
147
/// Runs a cleanup function/closure when dropped.
148
///
149
/// The [`ScopeGuard::dismiss`] function prevents the cleanup function from running.
0 commit comments