Postmonomorphism Asserts and Bound Hiding

This is not sound for the same reason as why specialization is not sound: lifetimes are erased post-monomorphization, but are needed to properly check bounds. In fact, the following use of the specialization feature is unsound.

Here's how this can be exploited Rust Playground

2 Likes