-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pin
is unsound due to rogue Deref/DerefMut implementations
#66544
Comments
I don't think people are necessarily seeing this, pinging all labelled teams: |
Well, a proposed partial fix. |
I still think the partial fix is worth it. I don't think we want to resolve this particular issue in any other way. Meanwhile, other soundness issues are more complicated, and can be solved separately from |
Fully agreed, and thanks for preparing that PR! I was just pointing out that the PR will not be sufficient to consider the problem solved. |
permit negative impls for non-auto traits This is a prototype impl that extends `impl !Trait` beyond auto traits. It is not integrated with coherence or anything else, and hence only serves to prevent downstream impls (but not to allow downstream crates to rely on the absence of such impls for coherence purposes). Fixes rust-lang#66544 TODO: - [x] need a test that you can't rely on negative impls for coherence purposes - [x] test that negative impls cannot specialize positive ones - [x] test that positive impls cannot specialize negative ones - [x] extend negative impl to `Clone` in order to fully fix rust-lang#66544 - [x] and maybe make `CoerceUnsized` unsafe? -- that problem is now split out into rust-lang#68015 - [x] introduce feature flag and prepare a write-up - [x] improve diagnostics?
@comex found a soundness bug in
Pin
. This issue is to track that.Discussion is happening on IRLO currently, let's try not to fork that.
The text was updated successfully, but these errors were encountered: