Skip to content

Improve macro hygiene #679

@wojciech-graj

Description

@wojciech-graj

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.

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