-
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
Rollup of 10 pull requests #137019
Closed
Closed
Rollup of 10 pull requests #137019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Huang Qi <[email protected]>
This fixes the issues described in rust-lang#136102. Primarily, this resolves some issues with how the documentation for the prelude is generated: - It avoids showing "unstable" for macros in the prelude that are actually stable. - Avoids duplication of some pages due to the previous lack of `doc(no_inline)`. - Makes the different edition preludes consistent, and sets a pattern that can be used by future editions. We may need to rearrange these modules in the future if we decide to remove anything from the prelude again. If we do, I think we should look into a different solution that avoids the documentation problems.
Use the existing `fill` methods on slices instead of manually writing the fill loop.
In the deferred initialization pattern, the docs were needlessly going through as_mut_ptr().write() to initialize, which is unnecessary use of a pointer, needs to be inside an unsafe block, and may weaken alias analysis.
`rustc_mir_dataflow/src/elaborate_drops.rs` contains some infrastructure used by a few MIR passes: the `elaborate_drop` function, the `DropElaborator` trait, etc. `rustc_mir_transform/src/elaborate_drops.rs` (same file name, different crate) contains the `ElaborateDrops` pass. It relies on a lot of the infrastructure from `rustc_mir_dataflow/src/elaborate_drops.rs`. It turns out that the drop infrastructure is only used in `rustc_mir_transform`, so this commit moves it there. (The only exception is the small `DropFlagState` type, which is moved to the existing `rustc_mir_dataflow/src/drop_flag_effects.rs`.) The file is renamed from `rustc_mir_dataflow/src/elaborate_drops.rs` to `rustc_mir_transform/src/elaborate_drop.rs` (with no trailing `s`) because (a) the `elaborate_drop` function is the most important export, and (b) `rustc_mir_transform/src/elaborate_drops.rs` already exists. All the infrastructure pieces that used to be `pub` are now `pub(crate)`, because they are now only used within `rustc_mir_transform`.
Because it's only used in `rustc_mir_transform`. (Presumably it is currently in `rustc_middle` because lots of other MIR-related stuff is, but that's not a hard requirement.) And because `rustc_middle` is huge and it's always good to make it smaller.
…bilee account for `c_enum_min_bits` in `multiple-reprs` UI test fixes rust-lang#135777
Correct comment for FreeBSD and DragonFly BSD in unix/thread
…ratt Remove the common prelude module This fixes the issues described in rust-lang#136102. Primarily, this resolves some issues with how the documentation for the prelude is generated: - It avoids showing "unstable" for macros in the prelude that are actually stable. - Avoids duplication of some pages due to the previous lack of `doc(no_inline)`. - Makes the different edition preludes consistent, and sets a pattern that can be used by future editions. We may need to rearrange these modules in the future if we decide to remove anything from the prelude again. If we do, I think we should look into a different solution that avoids the documentation problems. Closes rust-lang#136102
…heck, r=workingjubilee Remove `:` from `stack-protector-heuristics-effect.rs` Filecheck Pattern With function sections, the assembly label does not necessarily end in `:`. Remove trailing `:` to be more consistent with the rest of the existing Filecheck patterns. ``` // CHECK-LABEL: local_string_addr_taken #[no_mangle] pub fn local_string_addr_taken(f: fn(&String)) { let x = String::new(); f(&x); ```
add vendor directory to .gitignore
…nt, r=estebank Fix presentation of purely "additive" replacement suggestion parts rust-lang#127541 changes replacement suggestions to use the "diff" view always, which I think is really verbose in cases where a replacement snippet is a "superset" of the snippet that is being replaced. Consider: ``` LL - Self::Baz: Clone, LL + Self::Baz: Clone, T: std::clone::Clone ``` In this code, we suggest replacing `", "` with `", T: std::clone::Clone"`. This is a consequence of how the snippet is constructed. I believe that since the string that is being replaced is a subset of the replacement string, it's not providing much value to present this as a diff. Users should be able to clearly understand what's being suggested here using the `~` underline view we've been suggesting for some time now. Given that this affects ~100 tests out of the ~1000 UI tests affected, I expect this to be a pretty meaningful improvement of the fallout of rust-lang#127541. --- In the last commit, this PR also "trims" replacement parts so that they are turned into their purely additive subset, if possible. See the diff for what this means. --- r? estebank
Use `slice::fill` in `io::Repeat` implementation Use the existing `fill` methods on slices instead of manually writing the fill loop.
…it, r=tgross35 alloc boxed: docs: use MaybeUninit::write instead of as_mut_ptr In the deferred initialization pattern, the docs were needlessly going through `as_mut_ptr().write()` to initialize, which is unnecessary use of a pointer, needs to be inside an `unsafe` block, and may weaken alias analysis.
…compiler-errors Emit MIR for each bit with on `dont_reset_cast_kind_without_updating_operand` PR rust-lang#136450 introduced a diff that includes a pointer-sized alloc. This doesn't cause any problems on the compiler test suite but it affects the test suite that ferrocene has for `aarch64-unknown-none` as the snapshot of the diff only includes a 32-bit alloc even though this should be a 64-bit alloc on `aarch64-unknown-none`. r? `@compiler-errors`
…_transform, r=oli-obk Move code into `rustc_mir_transform` I found two modules in other crates that are better placed in `rustc_mir_transform`, because that's the only crate that uses them. r? `@matthewjasper`
@bors r+ rollup=never p=5 |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 14, 2025
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#135778 (account for `c_enum_min_bits` in `multiple-reprs` UI test) - rust-lang#136052 (Correct comment for FreeBSD and DragonFly BSD in unix/thread) - rust-lang#136886 (Remove the common prelude module) - rust-lang#136938 (Remove `:` from `stack-protector-heuristics-effect.rs` Filecheck Pattern) - rust-lang#136956 (add vendor directory to .gitignore) - rust-lang#136958 (Fix presentation of purely "additive" replacement suggestion parts) - rust-lang#136967 (Use `slice::fill` in `io::Repeat` implementation) - rust-lang#136976 (alloc boxed: docs: use MaybeUninit::write instead of as_mut_ptr) - rust-lang#137007 (Emit MIR for each bit with on `dont_reset_cast_kind_without_updating_operand`) - rust-lang#137008 (Move code into `rustc_mir_transform`) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
O-unix
Operating system: Unix-like
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
c_enum_min_bits
inmultiple-reprs
UI test #135778 (account forc_enum_min_bits
inmultiple-reprs
UI test):
fromstack-protector-heuristics-effect.rs
Filecheck Pattern #136938 (Remove:
fromstack-protector-heuristics-effect.rs
Filecheck Pattern)slice::fill
inio::Repeat
implementation #136967 (Useslice::fill
inio::Repeat
implementation)dont_reset_cast_kind_without_updating_operand
#137007 (Emit MIR for each bit with ondont_reset_cast_kind_without_updating_operand
)rustc_mir_transform
#137008 (Move code intorustc_mir_transform
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup