Skip to content

Commit

Permalink
(c2rust-analyze) Fix cast_fn_item_to_fn_ptr test to correctly cre…
Browse files Browse the repository at this point in the history
…ate a `PointerCast::ReifyFnPointer`.
  • Loading branch information
kkysen committed Jun 12, 2023
1 parent b20cea7 commit 19ce2bd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions c2rust-analyze/tests/analyze/string_casts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ pub fn cast_from_literal_explicit() {
}

/// [`PointerCast::ReifyFnPointer`]
/// Can't figure out how to create a [`PointerCast::ReifyFnPointer`].
#[cfg(any())]
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
}
f as fn(u8) -> i8;
}

Expand Down

0 comments on commit 19ce2bd

Please sign in to comment.