-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
std: Ensure AssertRecoverSafe indeed is more often #30513
Conversation
r? @aturon |
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
This makes me slightly nervous given the current naming. I'd be happy to r+ if we can think of a better name for this use. Maybe |
Hm yes indeed, although we do have an alternative of instead having a manual impl: impl<T> RecoverSafe for &AssertRecoverSafe<T> {}
impl<T> RecoverSafe for Rc<AssertRecoverSafe<T>> {}
// ... That just has the downside of being a little repetitive (e.g. needing a positive for every negative impl) and tough to remember (e.g. external crates with a negative Perhaps a name could be |
|
Types like `&AssertRecoverSafe<T>` and `Rc<AssertRecoverSafe<T>>` were mistakenly not considered recover safe, but the point of the assertion wrapper is that it indeed is! This was caused by an interaction between the `RecoverSafe` and `NoUnsafeCell` marker traits, and this is updated by adding an impl of the `NoUnsafeCell` marker trait for `AssertRecoverSafe` to ensure that it never interacts with the other negative impls of `RecoverSafe`. cc rust-lang#30510
8b650f6
to
cb3826d
Compare
Updated, re-r? |
@bors: r+ |
📌 Commit cb3826d has been approved by |
If it can be snuck in before bors merges it, can |
⌛ Testing commit cb3826d with merge 5c41d5e... |
💔 Test failed - auto-linux-32-nopt-t |
@bors: retry |
I'm very happy the trait is called RecoverSafe! 😄 |
⌛ Testing commit cb3826d with merge 3df4b3e... |
💔 Test failed - auto-mac-64-opt |
@bors: retry On Tue, Dec 22, 2015 at 3:49 AM, bors notifications@github.com wrote:
|
⚡ Previous build results for auto-linux-32-opt, auto-linux-64-debug-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-cross-opt, auto-linux-musl-64-opt, auto-mac-32-opt, auto-win-gnu-32-nopt-t, auto-win-msvc-32-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-64-x-android-t, auto-mac-64-nopt-t, auto-mac-64-opt, auto-win-gnu-32-opt, auto-win-gnu-64-nopt-t, auto-win-gnu-64-opt, auto-win-msvc-64-opt... |
@bors: retry force |
⌛ Testing commit cb3826d with merge bd13175... |
💔 Test failed - auto-linux-64-nopt-t |
@bors retry |
Types like `&AssertRecoverSafe<T>` and `Rc<AssertRecoverSafe<T>>` were mistakenly not considered recover safe, but the point of the assertion wrapper is that it indeed is! This was caused by an interaction between the `RecoverSafe` and `NoUnsafeCell` marker traits, and this is updated by adding an impl of the `NoUnsafeCell` marker trait for `AssertRecoverSafe` to ensure that it never interacts with the other negative impls of `RecoverSafe`. cc rust-lang#30510
Types like
&AssertRecoverSafe<T>
andRc<AssertRecoverSafe<T>>
weremistakenly not considered recover safe, but the point of the assertion wrapper
is that it indeed is! This was caused by an interaction between the
RecoverSafe
andNoUnsafeCell
marker traits, and this is updated by adding animpl of the
NoUnsafeCell
marker trait forAssertRecoverSafe
to ensure thatit never interacts with the other negative impls of
RecoverSafe
.cc #30510