Commit 8fef08e
authored
Rollup merge of #154624 - theemathas:deref-pure-dyn-incompat, r=jackh726
Make `DerefPure` dyn-incompatible
Fixes rust-lang/rust#154619.
If `DerefPure` were dyn-compatible, a trait object of a subtrait of `DerefPure` could be created by unsize-coercing an existing type that implements `DerefPure`. But then the trait object could have its own non-pure impl of `Deref`/`DerefMut`, which is unsound, since the trait object would implement `DerefPure`. Thus, we make `DerefPure` dyn-incompatible.
r? types0 file changed
0 commit comments