Skip to content

impl SomeType as a parameter on a mocked method does not compile #15

Closed
@nrxus

Description

@nrxus

Example: if a parameter to a mocked function is &impl serde::Serialize, faux will fail to compile.

The culprit is this line:

let input: (#(#arg_types),*) = unsafe { std::mem::transmute((#(#arg_idents),*)) };

This becomes:

 let input: (&impl serde::Serialize) = unsafe { std::mem::transmute((_x0)) };

There is an issue for using impl on a let binding but I am unsure how the transmute might work with that: rust-lang/rust#63065 🤷‍♂️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions