A few cleanups for rustc_data_structures#53223
Conversation
|
r? @oli-obk |
oli-obk
left a comment
There was a problem hiding this comment.
just some nits, lgtm otherwise
There was a problem hiding this comment.
Can we make the IdxSet #[transparent] to actually solve this issue?
There was a problem hiding this comment.
I'm not familiar with this attribute; is it sufficient that I additionally apply it to IdxSet?
There was a problem hiding this comment.
yes, just apply it to IdxSet and we should be good.
There was a problem hiding this comment.
I'm getting an error that The attribute transparent is currently unknown to the compiler during check; is it already available?
There was a problem hiding this comment.
sorry, it's #[repr(transparent)]
There was a problem hiding this comment.
Ah, that one I do know 👍.
src/librustc_data_structures/sync.rs
Outdated
There was a problem hiding this comment.
That's not quite the same thing. Now you can call this via value.into_inner(). I'm presuming the original author wanted it to be called as T::into_inner(value).
There was a problem hiding this comment.
I didn't get any errors when running stage 1 tests, so it might not even be used. I can change it back, of course.
There was a problem hiding this comment.
T::into_inner(value) would still work after your change, but now value.into_inner() would also work, which is something we try to avoid in certain situations.
Yea, please revert it.
There was a problem hiding this comment.
remove the local variable r entirely and add the question mark to the function call
be08838 to
db39943
Compare
|
@oli-obk Thanks, I addressed your remarks. |
|
@bors r+ rollup |
|
📌 Commit db399434ed27dfd9ccfdd5e29ef814623e1e0d6e has been approved by |
There was a problem hiding this comment.
This should probably be casting to *mut [Word] instead.
There was a problem hiding this comment.
Good call; I'll update the applicable commit.
db39943 to
b0246e3
Compare
|
@bors r=oli-obk |
|
📌 Commit b0246e3f655aec44c1a253204b70f822cca6fa13 has been approved by |
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
@bors r- |
b0246e3 to
94c3856
Compare
|
Oof 😐; test fixed. |
|
It's already fixed, can I get an r? |
|
@bors r=oli-obk |
|
📌 Commit 94c3856 has been approved by |
|
🌲 The tree is currently closed for pull requests below priority 10, this pull request will be tested once the tree is reopened |
…li-obk
A few cleanups for rustc_data_structures
- remove a redundant `clone()`
- make some calls to `.iter()` implicit
- collapse/simplify a few operations
- remove some explicit `return`s
- make `SnapshotMap::{commit, rollback_to}` take references
- remove unnecessary struct field names
- change `transmute()`s in `IdxSet::{from_slice, from_slice_mut}` to casts
- remove some unnecessary lifetime annotations
- split 2 long literals
…li-obk
A few cleanups for rustc_data_structures
- remove a redundant `clone()`
- make some calls to `.iter()` implicit
- collapse/simplify a few operations
- remove some explicit `return`s
- make `SnapshotMap::{commit, rollback_to}` take references
- remove unnecessary struct field names
- change `transmute()`s in `IdxSet::{from_slice, from_slice_mut}` to casts
- remove some unnecessary lifetime annotations
- split 2 long literals
Rollup of 15 pull requests Successful merges: - #52955 (Update compiler test documentation) - #53019 (Don't collect() when size_hint is useless) - #53025 (Consider changing assert! to debug_assert! when it calls visit_with) - #53059 (Remove explicit returns where unnecessary) - #53165 ( Add aarch64-unknown-netbsd target) - #53210 (Deny future duplication of rustc-ap-syntax) - #53223 (A few cleanups for rustc_data_structures) - #53230 ([nll] enable feature(nll) on various crates for bootstrap: part 4) - #53231 (Add let keyword doc) - #53240 (Add individual documentation for <integer>`.swap_bytes`/.`reverse_bits`) - #53253 (Remove unwanted console log) - #53264 (Show that Command can be reused and remodified) - #53267 (Fix styles) - #53273 (Add links to std::char::REPLACEMENT_CHARACTER from docs.) - #53283 (wherein we suggest float for integer literals where a float was expected) Failed merges: r? @ghost
clone().iter()implicitreturnsSnapshotMap::{commit, rollback_to}take referencestransmute()s inIdxSet::{from_slice, from_slice_mut}to casts