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 e02903c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 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) {
fn f(x: u8) -> i8 {
x as i8
}
f as fn(u8) -> i8;
}

Expand Down

0 comments on commit e02903c

Please sign in to comment.