Skip to content

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 16 commits March 30, 2025 04:22
this avoids crashes when `./build` is a symlink to a non-existent
directory.
…i-obk

Fix up partial res of segment in primitive resolution hack

There is a hack in the resolver:

```
// In `a(::assoc_item)*` `a` cannot be a module. If `a` does resolve to a module we
// don't report an error right away, but try to fallback to a primitive type.
```

This fixes up the resolution for primitives which would otherwise resolve to a module, but we weren't also updating the res of the path segment, leading to weird diagnostics.

We explicitly call `self.r.partial_res_map.insert` instead of `record_partial_res` b/c we have recorded a partial res already, and we specifically want to override it.

cc rust-lang#139095 (comment)
Detect and provide suggestion for `&raw EXPR`

When emitting an error in the parser, and we detect that the previous token was `raw` and we *could* have consumed `const`/`mut`, suggest that this may have been a mistyped raw ref expr. To do this, we add `const`/`mut` to the expected token set when parsing `&raw` as an expression (which does not affect the "good path" of parsing, for the record).

This is kind of a rudimentary error improvement, since it doesn't actually attempt to recover anything, leading to some other knock-on errors b/c we still treat `&raw` as the expression that was parsed... but at least we add the suggestion! I don't think the parser grammar means we can faithfully recover `&raw EXPR` early, i.e. during `parse_expr_borrow`.

Fixes rust-lang#133231
Visit place in `BackwardIncompatibleDropHint` statement

Remove a weird hack from the `LocalUpdater` where we were manually visiting the place stored in a `StatementKind::BackwardIncompatibleDropHint` because the MIR visitor impls weren't doing so.

Also, clean up `BackwardIncompatibleDropHint`s in `CleanupPostBorrowck`, since they're not needed for runtime MIR.
…lcnr

Remove `define_debug_via_print` for `ExistentialProjection`, use regular structural debug impl

The pretty print impl for `ExistentialProjection` always prints `AssocItem = Ty`:

https://github.com/rust-lang/rust/blob/6e830462330a9e34d8176e86d4580dd0820c6fd5/compiler/rustc_middle/src/ty/print/pretty.rs#L3293-L3299

We can't change this, b/c it's used for both pretty printing dyn types and for legacy symbol mangling.

Unfortunately, we also use this printing procedure for `Debug` impls. That means that it leaves out the *trait name* and *trait args* when debug printing an `ExistentialProjection` (or an `ExistentialPredicate` which has a variant for `ExistentialProjection`). This leads to awkward situations, like the two seemingly identical existential projection predicates present in a `dyn Trait` type using the definition below:

```rust
trait Super { type Assoc; }

trait Foo: Super<A, Assoc = i32> + Super<B, Assoc = i32> {}
```

Namely, they both just render as `Projection(Assoc = i32)`! This makes debugging `dyn Trait` type system bugs really hard, so let's use the *regular* debug impl for `ExistentialProjection`.
ptr docs: add missing backtics around 'usize'

We almost always have the backticks, except here... so let's just fix that. Barely worth a PR but it's user-visible docs so here we go.
use `realpath` in `bootstrap.py` when creating build-dir

Fixes rust-lang#139800
r? `@jieyouxu`

My use case for `./build` being a symlink is this: my "default" ~~partition~~ btrfs subvolume is snapshotted/backed up. I don't want to backup target-likes, so I move them to a special subvolume which isn't backed up. `./build` is a symlink into that subvolume. (`build.build-dir` configuration is not fully sufficient, it is still nice to be able to check build files with `ls ./build` or call tools from there)
…r=marcoieni

Improve wording of post-merge report

Slight changes to improve the rendered output e.g. [here](rust-lang#139241 (comment)) if only doctest changes were found.

r? `@marcoieni`
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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-infra Relevant to the infrastructure 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. rollup A PR which is a rollup labels Apr 14, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 14, 2025

📌 Commit 47e5b18 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 Apr 14, 2025
@bors
Copy link
Collaborator

bors commented Apr 14, 2025

⌛ Testing commit 47e5b18 with merge 990039e...

@bors
Copy link
Collaborator

bors commented Apr 14, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 990039e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 14, 2025
@bors bors merged commit 990039e into rust-lang:master Apr 14, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 14, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 07d3fd1 (parent) -> 990039e (this PR)

Test differences

Show 18 test diffs

Stage 1

  • [ui] tests/ui/parser/recover/raw-no-const-mut.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/prim-crate-partial-res.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/parser/recover/raw-no-const-mut.rs: [missing] -> pass (J0)
  • [ui] tests/ui/resolve/prim-crate-partial-res.rs: [missing] -> pass (J0)

Additionally, 14 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Job duration changes

  1. x86_64-apple-2: 4224.2s -> 6457.7s (52.9%)
  2. x86_64-apple-1: 6490.8s -> 9100.0s (40.2%)
  3. dist-x86_64-apple: 9705.4s -> 7629.4s (-21.4%)
  4. dist-apple-various: 8156.5s -> 6999.1s (-14.2%)
  5. dist-x86_64-linux-alt: 7629.6s -> 7051.7s (-7.6%)
  6. x86_64-gnu-debug: 6614.0s -> 6143.1s (-7.1%)
  7. dist-aarch64-linux: 5281.1s -> 5579.8s (5.7%)
  8. dist-x86_64-mingw: 7949.1s -> 7552.0s (-5.0%)
  9. dist-loongarch64-linux: 6357.6s -> 6646.0s (4.5%)
  10. x86_64-msvc-2: 7052.3s -> 7362.3s (4.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#139127 Fix up partial res of segment in primitive resolution hack 18c8c85276b0bb8f21871779fc320c6772bfea57 (link)
#139392 Detect and provide suggestion for &raw EXPR e17e611ac28a301f7583f0c4b0e20f6bebb906a6 (link)
#139767 Visit place in BackwardIncompatibleDropHint statement d56ee8c0d4d43d97e7f1318e4f24c4698072a1e0 (link)
#139777 Remove define_debug_via_print for ExistentialProjection 7a64349437d6a190aa77abf2d45762d79f6820d4 (link)
#139796 ptr docs: add missing backtics around 'usize' ecc4c40e970ca2c989299a29662cac3176a999bc (link)
#139801 Add myself to mailmap 15a0e593efee648f63c5eb8e7103e4b878431742 (link)
#139804 use realpath in bootstrap.py when creating build-dir c52f574b7b523944366a06751631ea510f447725 (link)
#139807 Improve wording of post-merge report fa8fb4b173358240f5eace1e2fb5d879608b3842 (link)

previous master: 07d3fd1d9b

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 (990039e): 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 -0.9%, secondary 4.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)
4.5% [2.1%, 6.8%] 2
Improvements ✅
(primary)
-0.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.9% [-0.9%, -0.9%] 1

Cycles

Results (primary 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.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [0.4%, 0.4%] 1

Binary size

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

Bootstrap: 784.108s -> 781.448s (-0.34%)
Artifact size: 365.13 MiB -> 365.12 MiB (-0.00%)

github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 19, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#139127 (Fix up partial res of segment in primitive resolution hack)
 - rust-lang#139392 (Detect and provide suggestion for `&raw EXPR`)
 - rust-lang#139767 (Visit place in `BackwardIncompatibleDropHint` statement)
 - rust-lang#139777 (Remove `define_debug_via_print` for `ExistentialProjection`, use regular structural debug impl)
 - rust-lang#139796 (ptr docs: add missing backtics around 'usize')
 - rust-lang#139801 (Add myself to mailmap)
 - rust-lang#139804 (use `realpath` in `bootstrap.py` when creating build-dir)
 - rust-lang#139807 (Improve wording of post-merge report)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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-infra Relevant to the infrastructure 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants