-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
option is_some() should not require a copyable value #2636
Comments
Does this go for vectors too? I think I've been having to add copy bounds, but if we're clever we should be able to rewrite them without needing copy. |
It often applies to vectors, yes. |
RalfJung
pushed a commit
to RalfJung/rust
that referenced
this issue
Nov 6, 2022
Stacked Borrows: make scalar field retagging the default I think it is time to finally close this soundness gap. Any objections? :) Unfortunately the latest released versions of hashbrown and scopeguard can fail under full field retagging. The fixes have landed in the git repos but have not been released yet. I don't know if scalar field retagging as enabled by this PR is sufficient to cause problems with these crates, but it seems likely that this would be the case -- e.g. if both `value` and `dropfn` are scalars, the entire scopeguard struct will be a `ScalarPair` and thus get field retagging. However, given that we actually generate LLVM `noalias` for these cases, it seems prudent to inform users of this risk. They can easily set `-Zmiri-field-retag=none` to opt-out of this change. Cc rust-lang/miri#2528
Aaron1011
pushed a commit
to Aaron1011/rust
that referenced
this issue
Jan 6, 2023
Stacked Borrows: make scalar field retagging the default I think it is time to finally close this soundness gap. Any objections? :) Unfortunately the latest released versions of hashbrown and scopeguard can fail under full field retagging. The fixes have landed in the git repos but have not been released yet. I don't know if scalar field retagging as enabled by this PR is sufficient to cause problems with these crates, but it seems likely that this would be the case -- e.g. if both `value` and `dropfn` are scalars, the entire scopeguard struct will be a `ScalarPair` and thus get field retagging. However, given that we actually generate LLVM `noalias` for these cases, it seems prudent to inform users of this risk. They can easily set `-Zmiri-field-retag=none` to opt-out of this change. Cc rust-lang/miri#2528
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
But it does now. Same with is_none(), iter(), and map() I believe. And possibly others.
The text was updated successfully, but these errors were encountered: