lowRISC / manticore

Apache License 2.0
16 stars 13 forks source link

[meta] Use `impl dyn Trait` as the object-safety assert idiom #126

Closed mcy closed 3 years ago

mcy commented 3 years ago

To test for object safety, we simply need to utter the type dyn Trait; if the trait is not object-safe, its dyn cannot be uttered.

This is what the macro we were using was basically already doing, but this lets us drop a dependency.

Signed-off-by: Miguel Young de la Sota mcyoung@google.com