Prevent downstream `impl DerefMut for Pin<LocalType>` The safety requirements for [`PinCoerceUnsized`](https://doc.rust-lang.org/stable/std/pin/trait.PinCoerceUnsized.html) are essentially that the type does not have a malicious `Deref` or `DerefMut` impl. However, the `Pin` type is fundamental, so the end-user can provide their own implementation of `DerefMut` for `Pin<&SomeLocalType>`, so it's possible for `Pin` to have a malicious `DerefMut` impl. This unsoundness is known as rust-lang/rust#85099. Unfortunately, this means that the implementation of `PinCoerceUnsized` for `Pin` is currently unsound. To fix that, modify the impl so that it becomes impossible for downstream crates to provide their own implementation of `DerefMut` for `Pin` by abusing a hidden struct that is not fundamental. This PR is a breaking change, but it fixes rust-lang/rust#85099. The PR supersedes rust-lang/rust#144896. r? lcnr |
||
|---|---|---|
| .. | ||
| analyze_source_file | ||
| edit_distance | ||
| source_map | ||
| symbol | ||
| analyze_source_file.rs | ||
| caching_source_map_view.rs | ||
| def_id.rs | ||
| edit_distance.rs | ||
| edition.rs | ||
| fatal_error.rs | ||
| hygiene.rs | ||
| lib.rs | ||
| profiling.rs | ||
| source_map.rs | ||
| span_encoding.rs | ||
| symbol.rs | ||
| tests.rs | ||