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 #137688

Merged
merged 48 commits into from
Feb 26, 2025
Merged

Rollup of 10 pull requests #137688

merged 48 commits into from
Feb 26, 2025

Conversation

fmease
Copy link
Member

@fmease fmease commented Feb 26, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

marxin and others added 30 commits February 12, 2025 07:46
While there were comments indicating which nightly versions the examples
were tested with, those versions did not work for me: neither did the
examples compile, nor did they produce the expected output.

This commit fixes the compilation issues, using nightly-2025-02-13 for
all examples (previously the version differed between the examples) and,
in the case of the `rustc_driver` examples, also fixes the argument
passing: rustc ignores the first argument, so we need to pass the
filename as the second (otherwise we only get the help text printed).

Note that the `rustc-interface-getting-diagnostics.rs` example still
does not produce any output, which I assume is not how it is intended.
However, I don't know enough to fix it.

To avoid inconsistencies between the documented version and the actually
required version I've moved the version comment from the Markdown into
the Rust code where it hopefully won't be forgotten as easily.

Finally I've clarified in the examples' README that you also need to use
the proper nightly version when compiling the examples, not just when
running them.
…check2

Start using latest release where -f checks all local links
…check2-v2

Bump mdbook-linkcheck2 dependency version
Co-authored-by: DianQK <[email protected]>
document how to setup RA for nvim automatically
Make it so that every structured error annotated with `#[derive(Diagnostic)]` that has a field of type `Ty<'_>`, the printing of that value into a `String` will look at the thread-local storage `TyCtxt` in order to shorten to a length appropriate with the terminal width. When this happen, the resulting error will have a note with the file where the full type name was written to.

```
error[E0618]: expected function, found `((..., ..., ..., ...), ..., ..., ...)``
 --> long.rs:7:5
  |
6 | fn foo(x: D) { //~ `x` has type `(...
  |        - `x` has type `((..., ..., ..., ...), ..., ..., ...)`
7 |     x(); //~ ERROR expected function, found `(...
  |     ^--
  |     |
  |     call expression requires function
  |
  = note: the full name for the type has been written to 'long.long-type-14182675702747116984.txt'
  = note: consider using `--verbose` to print the full type name to the console
```
```
error[E0614]: type `(..., ..., ..., ...)` cannot be dereferenced
  --> $DIR/long-E0614.rs:10:5
   |
LL |     *x;
   |     ^^ can't be dereferenced
   |
   = note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
   = note: consider using `--verbose` to print the full type name to the console
```
…, r=oli-obk

Teach structured errors to display short `Ty<'_>`

Make it so that in every structured error annotated with `#[derive(Diagnostic)]` that has a field of type `Ty<'_>`, the printing of that value into a `String` will look at the thread-local storage `TyCtxt` in order to shorten to a length appropriate with the terminal width. When this happen, the resulting error will have a note with the file where the full type name was written to.

```
error[E0618]: expected function, found `((..., ..., ..., ...), ..., ..., ...)``
 --> long.rs:7:5
  |
6 | fn foo(x: D) { //~ `x` has type `(...
  |        - `x` has type `((..., ..., ..., ...), ..., ..., ...)`
7 |     x(); //~ ERROR expected function, found `(...
  |     ^--
  |     |
  |     call expression requires function
  |
  = note: the full name for the type has been written to 'long.long-type-14182675702747116984.txt'
  = note: consider using `--verbose` to print the full type name to the console
```

Follow up to and response to the comments on rust-lang#136898.

r? ``@oli-obk``
…, r=ChrisDenton

Fix `attr` cast for espidf

rust-lang#136826 broke ESP-IDF builds with: https://github.com/esp-rs/esp-idf-template/actions/runs/13516221587/job/37765336588.

This PR fixes it.

cc: ``@ivmarkov`` ``@xizheyin``
…rrors

Avoid collecting associated types for undefined trait

Fixes rust-lang#137508
Fixes rust-lang#137554
…, r=SparrowLii

Don't suggest constraining unstable associated types

Fixes rust-lang#137624

This could be made a bit more specific, considering the local crate's stability or nightly status or something, but I think in general we should not be suggesting associated type bounds on unstable associated items.
Rustc dev guide subtree update

r? ``@Kobzol`` ``@jieyouxu``
Update gcc submodule

To add support for the x87 feature (see rust-lang#137612 (comment)).

r? `@antoyo`
… r=Kobzol

revert accidental change in get_closest_merge_commit

This was accidentally merged as part of rust-lang#137594. I need this local diff to be able to debug miri syncs, and then typed `git commit -a` too fast and didn't realize it includes this change... sorry for that.

r? ``@Kobzol``
… r=Nadrieril

Make -Z unpretty=mir suggest -Z dump-mir as well for discoverability

While debugging something else, I got quite annoyed with `-Z unpretty=mir` showing me post-processed MIR instead of the one just after it is built. I ended up asking on Zulip and got pointed to `-Z dump-mir`. While this feature is documented in the rustc dev guide, I think it'd be good if the possibility of making use of it was staring you in the face while you need it.
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide 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. rollup A PR which is a rollup labels Feb 26, 2025
@fmease
Copy link
Member Author

fmease commented Feb 26, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Feb 26, 2025

📌 Commit 46eb43e has been approved by fmease

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 Feb 26, 2025
@bors
Copy link
Contributor

bors commented Feb 26, 2025

⌛ Testing commit 46eb43e with merge 00f245915b0c7839d42c26f9628220c4f1b93bf6...

@bors
Copy link
Contributor

bors commented Feb 26, 2025

☀️ Test successful - checks-actions
Approved by: fmease
Pushing 00f2459 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 26, 2025
@bors bors merged commit 00f2459 into rust-lang:master Feb 26, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 26, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#134585 remove MaybeUninit::uninit_array 1addd61d0be8d51bda05d81454345a1f83290ccc (link)
#136187 Use less CString in the examples of CStr. f07c100399f1ded42e5679fa3a7fc2e92dfb438f (link)
#137201 Teach structured errors to display short Ty<'_> 68bcff183fbac9d0da30d5ab6d4d19eefa6f713f (link)
#137620 Fix attr cast for espidf 1a184cb6fe9d707b4072c7b7f111641a49761ade (link)
#137631 Avoid collecting associated types for undefined trait a9ca133a436aaa32a512ddff62b5d7d4afbd1a70 (link)
#137635 Don't suggest constraining unstable associated types 02f581725525145cbc479444bb09174ae803a607 (link)
#137642 Rustc dev guide subtree update 558189c97c3506e6a64ad200117f6ad9cd7950bc (link)
#137660 Update gcc submodule e8c106a0cbdb3ca35d2f8557c9730057c1771b3b (link)
#137670 revert accidental change in get_closest_merge_commit d582427055f991277569b62fda2aebe2ca88cd49 (link)
#137671 Make -Z unpretty=mir suggest -Z dump-mir as well for discov… c01c985cf668a74b8c494ba23f570aeeac02b28e (link)

previous master: ac91805f31

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

@fmease fmease deleted the rollup-gbeuj9j branch February 26, 2025 23:48
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (00f2459): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

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

Max RSS (memory usage)

Results (primary 1.6%)

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

Cycles

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

Binary size

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

Bootstrap: 771.284s -> 770.979s (-0.04%)
Artifact size: 361.94 MiB -> 361.96 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.