asomers / mockall

A powerful mock object library for Rust
Apache License 2.0
1.5k stars 62 forks source link

Fix using #[concretize] on functions with bounded generic types #531

Closed asomers closed 10 months ago

asomers commented 10 months ago

It's usually possible to turn such types into trait objects. We just need to emit extra parenthesis in the generated code.

Fixes #530

asomers commented 10 months ago

cc @glueball can you please test this change?

glueball commented 10 months ago

Tested with

[patch.crates-io]
mockall = { git = "https://github.com/asomers/mockall", branch = "concretize-bounds" }

It works! Awesome ;)