std: Tidy up some unsafe impls for sync#22596
Conversation
This commit removes many unnecessary `unsafe impl` blocks as well as pushing the needed implementations to the lowest level possible. I noticed that the bounds for `RwLock` are a little off when reviewing rust-lang#22574 and wanted to ensure that we had our story straight on these implementations.
|
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
"totally private" ... pub struct Flag. :P
|
@bors r+ 64fe |
This commit removes many unnecessary `unsafe impl` blocks as well as pushing the needed implementations to the lowest level possible. I noticed that the bounds for `RwLock` are a little off when reviewing rust-lang#22574 and wanted to ensure that we had our story straight on these implementations.
|
⌛ Testing commit 64fe93e with merge 0d6e229... |
|
💔 Test failed - auto-linux-64-x-android-t |
|
@bors: retry |
|
⚡ Previous build results are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-mac-32-opt, auto-mac-64-nopt-t, auto-mac-64-opt, auto-win-32-nopt-t, auto-win-32-opt, auto-win-64-nopt-t, auto-win-64-opt... |
1 similar comment
|
⚡ Previous build results are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-mac-32-opt, auto-mac-64-nopt-t, auto-mac-64-opt, auto-win-32-nopt-t, auto-win-32-opt, auto-win-64-nopt-t, auto-win-64-opt... |
|
💔 Test failed - auto-win-32-nopt-t |
|
@bors: retry (Please ignore the failures for now) |
|
⚡ Previous build results are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-mac-32-opt, auto-mac-64-nopt-t, auto-mac-64-opt, auto-win-32-nopt-t, auto-win-32-opt, auto-win-64-nopt-t, auto-win-64-opt... |
|
💔 Test failed - auto-mac-64-opt |
by reusing the function escape_snippet_bits used in postfix.rs, the issue seems to be gone completely. made one test cases, using $bar as per the issue rust-lang#22596 by kpreid. tried making a $0 test case but although it was working on the IDE, the test case always failed. a possible improvement would be moving escape_snippet_bits to place where both postfix.rs and on_enter.rs can see it, but im not sure where I would do that...
This commit removes many unnecessary
unsafe implblocks as well as pushing theneeded implementations to the lowest level possible. I noticed that the bounds
for
RwLockare a little off when reviewing #22574 and wanted to ensure that wehad our story straight on these implementations.