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 6 pull requests #133841

Merged
merged 19 commits into from
Dec 4, 2024
Merged

Rollup of 6 pull requests #133841

merged 19 commits into from
Dec 4, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

aDotInTheVoid and others added 19 commits December 2, 2024 19:06
It is unnecessary, these get constrained when checking that the
opaque type is well-formed.

It also results in the opaque type no longer being well formed.
If you've got `fn foo<'a>() -> impl Sized + 'a` the opaque is
`type Opaque<'a, 'aDummy> where 'a: 'aDummy, 'aDummy: 'a` where
`'aDummy`  is bivariant. If we call `foo::<'b>()`  inside of a closure
and its return type ends up in a type test, we start out with the WF
`Opaque<'b, 'b>`, and then replace the bivariant `'b` with `'static`.
`Opaque<'b, 'static>`  is no longer well-formed. Given how these type
tests are used, I don't think this caused any practical issues.
…projection, r=oli-obk

Update `NonZero` and `NonNull` to not field-project (per MCP#807)

rust-lang/compiler-team#807 (comment) was accepted, so this is the first PR towards moving the library to not using field projections into `[rustc_layout_scalar_valid_range_*]` types.

`NonZero` was already using `transmute` nearly everywhere, so there are very few changes to it.

`NonNull` needed more changes, but they're mostly simple, changing `.pointer` to `.as_ptr()`.

r? libs

cc rust-lang#133324, which will tidy up some of the MIR from this a bit more, but isn't a blocker.
…omez

rustdoc: Rename `set_back_info` to `restore_module_data`.

Follow-up to rust-lang#133345, r? `@GuillaumeGomez`

Most of the references to `info` got removed as it was clear that `module_data` makes more sense here. Makes it clearer that `save_module_data` and `restore_module_data` are a pair.
Fix MutVisitor's default implementations to visit Stmt's and BinOp's spans

The `Stmt` case is a bug introduced almost certainly unintentionally by rust-lang#126993. The code _used_ to visit and mutate `span` correctly, but got changed as follows by that PR. Notice how `span` is **copied** into the output by `|kind| Stmt { id, kind, span }` which happens after the mutation in the correct code (red) and before the mutation in the incorrect code (green).

```diff
  pub fn noop_flat_map_stmt<T: MutVisitor>(
      Stmt { kind, mut span, mut id }: Stmt,
      vis: &mut T,
  ) -> SmallVec<[Stmt; 1]> {
      vis.visit_id(&mut id);
-     vis.visit_span(&mut span);
      let stmts: SmallVec<_> = noop_flat_map_stmt_kind(kind, vis)
          .into_iter()
          .map(|kind| Stmt { id, kind, span })
          .collect();
      if stmts.len() > 1 {
          panic!(...);
      }
+     vis.visit_span(&mut span);
      stmts
  }
```
…iler-errors

stop replacing bivariant args with `'static` when computing closure requirements

It is unnecessary, these get constrained when checking that the opaque type is well-formed.

It also results in the opaque type no longer being well formed. If you've got `fn foo<'a>() -> impl Sized + 'a` the opaque is `type Opaque<'a, 'aDummy> where 'a: 'aDummy, 'aDummy: 'a` where `'aDummy`  is bivariant. If we call `foo::<'b>()`  inside of a closure and its return type ends up in a type test, we start out with the WF `Opaque<'b, 'b>`, and then replace the bivariant `'b` with `'static`. `Opaque<'b, 'static>` is no longer well-formed. Given how these type tests are used, I don't think this caused any practical issues.

r? types
…riddle

Improve code for FileName retrieval in rustdoc

Some calls were performed twice (first in `is_real_and_local` and then in the function calling it). Also the `FileName` was matched on a few times too.

r? `@notriddle`
…eyouxu

Use `eprintln` instead of `println` in bootstrap/compiletest/tidy

A big unconditional CTRL-F replace to start with to check if there's anything that CI expects to be on stdout

r? `@jieyouxu`
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc 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 4, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Dec 4, 2024

📌 Commit 0585134 has been approved by matthiaskrgr

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 4, 2024
@bors
Copy link
Contributor

bors commented Dec 4, 2024

⌛ Testing commit 0585134 with merge 733616f...

@bors
Copy link
Contributor

bors commented Dec 4, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 733616f to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#133651 Update NonZero and NonNull to not field-project (per MC… 571bc7e5f9e30fd326916c16cdf05ccc0c5844ad (link)
#133764 rustdoc: Rename set_back_info to restore_module_data. 3984e429c7747d7992980c67fec286fe29a66473 (link)
#133784 Fix MutVisitor's default implementations to visit Stmt's an… 42952d75cfb162a2a4cf11ccf0f56ba71c34dc08 (link)
#133798 stop replacing bivariant args with 'static when computing… e6d0889b1e998b1e2a69e7aaac77e3b895a3963d (link)
#133804 Improve code for FileName retrieval in rustdoc 5e01c4adee9830b65606b6637a90786474f95d6a (link)
#133817 Use eprintln instead of println in bootstrap/compiletes… 8b07dabab3c566811b6f333ef341c9b440f2bc4a (link)

previous master: 2633e01929

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 (733616f): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.7% [0.2%, 1.4%] 10
Regressions ❌
(secondary)
0.6% [0.6%, 0.6%] 1
Improvements ✅
(primary)
-0.3% [-0.5%, -0.1%] 2
Improvements ✅
(secondary)
-0.2% [-0.4%, -0.1%] 5
All ❌✅ (primary) 0.5% [-0.5%, 1.4%] 12

Max RSS (memory usage)

Results (primary -1.9%)

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)
2.6% [1.6%, 3.6%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-4.2% [-6.8%, -1.6%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.9% [-6.8%, 3.6%] 6

Cycles

Results (primary 1.1%)

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)
1.1% [1.0%, 1.3%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [1.0%, 1.3%] 3

Binary size

Results (primary 0.2%, secondary -0.4%)

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.3% [0.0%, 2.6%] 54
Regressions ❌
(secondary)
0.1% [0.0%, 0.3%] 8
Improvements ✅
(primary)
-0.2% [-0.6%, -0.1%] 12
Improvements ✅
(secondary)
-1.4% [-6.1%, -0.2%] 5
All ❌✅ (primary) 0.2% [-0.6%, 2.6%] 66

Bootstrap: 767.384s -> 766.894s (-0.06%)
Artifact size: 330.84 MiB -> 330.84 MiB (0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Dec 4, 2024
@Mark-Simulacrum
Copy link
Member

@rust-timer build e6d0889

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e6d0889): comparison URL.

Overall result: ✅ improvements - no action needed

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

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

Max RSS (memory usage)

Results (secondary 3.4%)

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)
3.4% [3.4%, 3.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (primary -2.5%, secondary 3.0%)

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)
3.0% [2.4%, 3.9%] 9
Improvements ✅
(primary)
-2.5% [-2.5%, -2.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.5% [-2.5%, -2.5%] 1

Binary size

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

Bootstrap: 767.384s -> 764.718s (-0.35%)
Artifact size: 330.84 MiB -> 330.82 MiB (-0.00%)

@matthiaskrgr matthiaskrgr deleted the rollup-2snj3hc branch January 25, 2025 09:13
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-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. 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.