You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// include/header.h
#pragma once
#include"rust/cxx.h"voidf(rust::Fn<void(rust::Fn<void()> y)> x);
This currently emits a warning but otherwise compiles (and probably does the wrong thing). It needs to error instead because we don't yet fully support function pointers getting passed in the C++-to-Rust direction -- tracked in #52.
warning: `extern` fn uses type `fn()`, which is not FFI-safe --> src/lib.rs:6:23 |6 | fn f(x: fn(y: fn())); | ^^^^ not FFI-safe | = note: `#[warn(improper_ctypes_definitions)]` on by default = help: consider using an `extern fn(...) -> ...` function pointer instead = note: this function pointer has Rust-specific calling convention
The text was updated successfully, but these errors were encountered:
This currently emits a warning but otherwise compiles (and probably does the wrong thing). It needs to error instead because we don't yet fully support function pointers getting passed in the C++-to-Rust direction -- tracked in #52.
The text was updated successfully, but these errors were encountered: