Asteracea
Asteracea copied to clipboard
Better `Unpin` constraints via `impl` collision
If trait overlap detection was more accurate, it would be possible to forbid unsound Unpin implementations much more ergonomically (showing a very descriptive trait name with associated documentation in the error). However, this is currently blocked by https://github.com/rust-lang/rust/issues/50551 Coherence rules are not consistent when applied to auto traits .
Alternatively, this pull request could be made obsolete using const asserts based on min_specialization, via https://github.com/rust-lang/rust/issues/31844 "Tracking issue for specialization (RFC 1210)" .
This can likely be done nicely using const panics now.