Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // FIRST ERROR:
- async fn import_u32_async() -> u32; // Example of added imported function
- :\Programming\Rust\fp-bindgen-simple-example\examples\example-protocol\bindings\rust-plugin\src\import.rs:123:1
- |
- 123 | #[fp_bindgen_support::fp_import_signature]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- | |
- | expected `u64`, found `u32`
- | arguments to this function are incorrect
- |
- note: associated function defined here
- --> E:\Programming\Rust\fp-bindgen-simple-example\fp-bindgen-support\src\guest\async\mod.rs:26:19
- |
- 26 | pub unsafe fn new(async_value_ptr: FatPtr) -> Self {
- | ^^^
- = note: this error originates in the attribute macro `fp_bindgen_support::fp_import_signature` (in Nightly builds, run with -Z macro-backtrace for more info)
- help: you can convert a `u32` to a `u64`
- |
- 123 | #[fp_bindgen_support::fp_import_signature].into()
- | +++++++
- // SECOND ERROR:
- async fn export_u64_async() -> u64; // Exported async function returning u64
- error[E0308]: mismatched types
- --> src\spec\bindings.rs:883:67
- |
- 883 | let result = result.map(|ref data| deserialize_from_slice(data));
- | ---------------------- ^^^^ expected slice `[u8]`, found `u64`
- | |
- | arguments to this function are incorrect
- |
- = note: expected reference `&[u8]`
- found reference `&u64`
- note: function defined here
- --> E:\Programming\Rust\fp-bindgen-simple-example\fp-bindgen-support\src\host\mem.rs:18:8
- |
- 18 | pub fn deserialize_from_slice<'a, T: Deserialize<'a>>(slice: &'a [u8]) -> T {
- | ^^^^^^^^^^^^^^^^^^^^^^
- error[E0308]: mismatched types
- --> src\spec\bindings.rs:896:12
- |
- 896 | Ok(result)
- | -- ^^^^^^ expected `u64`, found struct `Vec`
- | |
- | arguments to this enum variant are incorrect
- |
- = note: expected type `u64`
- found struct `Vec<u8>`
- note: tuple variant defined here
- --> C:\Programs\Rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\result.rs:508:5
- |
- 508 | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | ^^
- error[E0308]: mismatched types
- --> src\wasi_spec\bindings.rs:886:67
- |
- 886 | let result = result.map(|ref data| deserialize_from_slice(data));
- | ---------------------- ^^^^ expected slice `[u8]`, found `u64`
- | |
- | arguments to this function are incorrect
- |
- = note: expected reference `&[u8]`
- found reference `&u64`
- note: function defined here
- --> E:\Programming\Rust\fp-bindgen-simple-example\fp-bindgen-support\src\host\mem.rs:18:8
- |
- 18 | pub fn deserialize_from_slice<'a, T: Deserialize<'a>>(slice: &'a [u8]) -> T {
- | ^^^^^^^^^^^^^^^^^^^^^^
- error[E0308]: mismatched types
- --> src\wasi_spec\bindings.rs:899:12
- |
- 899 | Ok(result)
- | -- ^^^^^^ expected `u64`, found struct `Vec`
- | |
- | arguments to this enum variant are incorrect
- |
- = note: expected type `u64`
- found struct `Vec<u8>`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement