diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-05-13 21:14:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-13 21:14:16 -0400 |
| commit | 209703af853eed8abfc4dfce54aa7f38273fcf6d (patch) | |
| tree | d449a6dd994c684462dd58928c59e83e3ca47b85 /compiler/rustc_parse/src/errors.rs | |
| parent | 18d9c039bb83483c5b1bfec2ebc333d0462c508d (diff) | |
| parent | b3a78c1d094eb978ec876643c3c4d0e5349b1073 (diff) | |
| download | rust-209703af853eed8abfc4dfce54aa7f38273fcf6d.tar.gz rust-209703af853eed8abfc4dfce54aa7f38273fcf6d.zip | |
Rollup merge of #125072 - Darksonn:pin-dyn-dispatch-sound, r=jhpratt
Add test for dynamic dispatch + Pin::new soundness While working on [the `#[derive(SmartPointer)]` RFC][1], I realized that the soundness of <code>impl [DispatchFromDyn](https://doc.rust-lang.org/stable/std/ops/trait.DispatchFromDyn.html) for [Pin](https://doc.rust-lang.org/stable/std/pin/struct.Pin.html)</code> relies on the restriction that you can't implement [`Unpin`](https://doc.rust-lang.org/stable/std/marker/trait.Unpin.html) for trait objects. As far as I can tell, the relevant error exists to solve some unrelated issues with coherence. To avoid cases where `Pin` is made unsound due to changes in the coherence-related errors, add a test that verifies that unsound use of `Pin` and `DispatchFromDyn` does not become allowed in the future. [1]: https://github.com/rust-lang/rfcs/pull/3621
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
