Skip to content
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 #133770

Merged
merged 28 commits into from
Dec 3, 2024
Merged

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 28 commits November 27, 2024 15:27
Signed-off-by: onur-ozkan <work@onurozkan.dev>
As of rust-lang#133155 `Formatter:new` uses `as_results_cursor` to create a
non-mutable results reference, and then later that is accessed via
`deref_mut` which results in a runtime abort. Changing to
`as_results_cursor_mut` fixes it.

Fixes rust-lang#133641.
The `Borrowed` variant is no longer used. This commit removes it, along
with the `as_results_cursor` method that produces it, and renames
`as_results_cursor_mut` as `as_results_cursor`.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Mark the following API const stable:

    impl<T> MaybeUninit<T> {
        pub const fn write(&mut self, val: T) -> &mut T;
    }

This depends on `const_mut_refs` and `const_maybe_uninit_assume_init`,
both of which have recently been stabilized.

Tracking issue: <rust-lang#63567>
These operations are much more about lowering the HIR than about
`Const`s themselves. They fit better in hir_ty_lowering with
`lower_const_arg` (formerly `Const::from_const_arg`) and the rest.

To accomplish this, `const_evaluatable_predicates_of` had to be changed
to not use `from_anon_const` anymore. Instead of visiting the HIR and
lowering anon consts on the fly, it now visits the `rustc_middle::ty`
data structures instead and directly looks for `UnevaluatedConst`s. This
approach was proposed in:
rust-lang#131081 (comment)
…nit_write, r=RalfJung,dtolnay

Stabilize `const_maybe_uninit_write`

Mark the following API const stable:

```rust
impl<T> MaybeUninit<T> {
    pub const fn write(&mut self, val: T) -> &mut T;
}
```

This depends on `const_mut_refs` and [`const_maybe_uninit_assume_init`](rust-lang#86722), both of which have recently been stabilized.

Closes: <rust-lang#63567>
…ure-compat, r=davidtwco

show forbidden_lint_groups in future-compat reports

Part of rust-lang#81670. This has been a future-compat lint for a while, time to dial it up to show up in reports.
…xyUwU

Move `Const::{from_anon_const,try_from_lit}` to hir_ty_lowering

Fixes rust-lang#128176.
This accomplishes one of the followup items from rust-lang#131081.

These operations are much more about lowering the HIR than about
`Const`s themselves. They fit better in hir_ty_lowering with
`lower_const_arg` (formerly `Const::from_const_arg`) and the rest.

To accomplish this, `const_evaluatable_predicates_of` had to be changed
to not use `from_anon_const` anymore. Instead of visiting the HIR and
lowering anon consts on the fly, it now visits the `rustc_middle::ty`
data structures instead and directly looks for `UnevaluatedConst`s. This
approach was proposed in:
rust-lang#131081 (comment)

r? `@BoxyUwU`
Use c"lit" for CStrings without unwrap

I've reviewed uses of `CString::new("lit")`.

Some could be changed to `c"lit"`. Some could be changed to `c"lit".to_owned()`, avoiding an `unwrap()`.

Many `CString` documentation examples could be simplified. I deliberately haven't changed all the examples to use the exact same expression, so that they can demonstrate many ways of creating `CString`s.

I've left UI tests mostly unchanged, because `c""` requires edition 2021, but most UI tests use 2015, and I didn't want to accidentally change what the tests are testing.
…e, r=compiler-errors

fix ICE when promoted has layout size overflow

Turns out there is no reason to distinguish `tainted_by_errors` and `can_be_spurious` here, we can just track whether we allow this even in "infallible" constants.

Fixes rust-lang#125476
add "profiler" and "optimized-compiler-builtins" option coverage for ci-rustc

Adds "profiler" and "optimized-compiler-builtins" option coverage in CI-rustc config compatibility check.

Resolves rust-lang#133675
…cs, r=jieyouxu

Reducing `target_feature` check-cfg merge conflicts

It was rightfully pointed in rust-lang#133099 (comment) that the expected values for the `target_feature` cfg are regularly updated and unfortunately the check-cfg tests for it are very merge-conflict prone.

This PR aims at drastically reducing the likely-hood of those, by normalizing the "and X more" diagnostic, as well as making the full expected list multi-line instead of being on a single one.

cc `@RalfJung`
r? `@jieyouxu`
…w, r=compiler-errors

Fix `-Zdump-mir-dataflow`

r? `@cjgillot`
Change `AttrArgs::Eq` to a struct variant

Cleanups for simplifying rust-lang#131808

Basically changes `AttrArgs::Eq` to a struct variant and then avoids several matches on `AttrArgsEq` in favor of methods on it. This will make future refactorings simpler, as they can either keep methods or switch to field accesses without having to restructure code
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs labels Dec 2, 2024
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. rollup A PR which is a rollup labels Dec 2, 2024
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=10 rollup=never

@bors
Copy link
Contributor

bors commented Dec 2, 2024

📌 Commit 73f225a has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 2, 2024
@bors
Copy link
Contributor

bors commented Dec 3, 2024

⌛ Testing commit 73f225a with merge 41cbe3e...

@bors
Copy link
Contributor

bors commented Dec 3, 2024

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 41cbe3e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 3, 2024
@bors bors merged commit 41cbe3e into rust-lang:master Dec 3, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 3, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#131713 Stabilize const_maybe_uninit_write d9f3089c6ebea8902617d3cc9c826f724d8add51 (link)
#133535 show forbidden_lint_groups in future-compat reports c450caa503d5c9d9b7c3089dfea3666cf1aec275 (link)
#133610 Move Const::{from_anon_const,try_from_lit} to hir_ty_lowe… 5b56a2a434b289a60535ad69ae07d1fe5b2609aa (link)
#133701 Use c"lit" for CStrings without unwrap d03ec32f48c6af7fcb2d6bded7563fb5f218b412 (link)
#133704 fix ICE when promoted has layout size overflow 91579230efa400b3d92b8fd5475afdb2b33fbc97 (link)
#133705 add "profiler" and "optimized-compiler-builtins" option cov… 3c8a7ec750b5c25967bebc5af5f5374a69ba79e7 (link)
#133710 Reducing target_feature check-cfg merge conflicts add31b524e3e5fd5cbedab1d6e9c9a8880ccccc1 (link)
#133732 Fix -Zdump-mir-dataflow fe77d81aa12c78d40a04d366e6c8f1e2f78aa837 (link)
#133746 Change AttrArgs::Eq to a struct variant d5fb539ca2bec864a9ca084a444e165e7f6983ef (link)
#133763 Fix f16::midpoint const feature gate 4b84957e7542cc1c80198c310b7ec0ca848ba370 (link)

previous master: 42b4b9c669

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (41cbe3e): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -1.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.5% [-1.5%, -1.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.5% [-1.5%, -1.5%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 768.021s -> 767.847s (-0.02%)
Artifact size: 332.25 MiB -> 332.18 MiB (-0.02%)

@GuillaumeGomez GuillaumeGomez deleted the rollup-l62iyyx branch December 3, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.