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.
c2rust-analyze
cast_fn_item_to_fn_ptr
PointerCast::ReifyFnPointer
1 parent b20cea7 commit 19ce2bdCopy full SHA for 19ce2bd
c2rust-analyze/tests/analyze/string_casts.rs
@@ -35,9 +35,10 @@ pub fn cast_from_literal_explicit() {
35
}
36
37
/// [`PointerCast::ReifyFnPointer`]
38
-/// Can't figure out how to create a [`PointerCast::ReifyFnPointer`].
39
-#[cfg(any())]
40
-pub fn cast_fn_item_to_fn_ptr(f: impl Fn(u8) -> i8) {
+pub fn cast_fn_item_to_fn_ptr() {
+ fn f(x: u8) -> i8 {
+ x as i8
41
+ }
42
f as fn(u8) -> i8;
43
44
0 commit comments