But this currently returns a ModItem with no body.
The alternative is:
// inside foo.rs
#[faux::mock]
mod inner_foo {
struct Foo {}
impl Foo {}
}
pub use inner_foo::*;
There is a clear ergonomic hit to this latter approach though. I would very much dislike foricng the user to write this kind of code just to support faux. This makes me unsure if a mod-level macro would be that useful until either option 1 or 2 are allowed.
Ideally something like this would work
Unfortunately custom inner attributes are not supported
I would also be okay with
But this currently returns a
ModItem
with no body.The alternative is:
There is a clear ergonomic hit to this latter approach though. I would very much dislike foricng the user to write this kind of code just to support
faux
. This makes me unsure if a mod-level macro would be that useful until either option 1 or 2 are allowed.