The mock! macro currently has very poor hygiene, often generating code with types like Box or Clone instead of ::std::boxed::Box or ::std::clone::Clone. This is an issue for crates that are conditionally no_std, for example:
#![no_std]
#[cfg(test)]
extern crate std;
Such a setup means they get the core prelude instead of the std one, meaning that compilation fails until you manually use these types.
The
mock!macro currently has very poor hygiene, often generating code with types likeBoxorCloneinstead of::std::boxed::Boxor::std::clone::Clone. This is an issue for crates that are conditionallyno_std, for example:Such a setup means they get the core prelude instead of the std one, meaning that compilation fails until you manually
usethese types.