Skip to content

Rollup of 8 pull requests #143755

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

Closed
wants to merge 41 commits into from
Closed

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jul 10, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dpaoliello and others added 30 commits June 13, 2025 15:27
We don't need to put the length of the `riscv_hwprobe` array into a
variable.  This commit removes that variable and gives the length
of the output slice to the `__riscv_hwprobe` directly.
These were left as `CURRENT_RUSTC_VERSION` in the submodule.
- Update ui.md
- Update type-alias-impl-trait.md
- Update README.md
This updates the rust-version file to 1b61d43.
Originally, we used an array of `riscv_hwprobe` directly and indexed
using raw numbers, making correspondence between the index and the query
key less obvious.

We also frequently used `out[idx].key != -1` to test whether the key is
supported by the `riscv_hwprobe` system call (on the Linux kernel
version we are testing) but we'd better to integrate with an operation
to retrieve the value.

This commit improves the ergonomics of feature querying by:

1.  Utilizing macros to
    a.  enable indexing by identifier names and
    b.  encapsulate accesses to the `riscv_hwprobe` array to query and
2.  New method `riscv_hwprobe::get()` returning `Option<u64>`,
    integrating availability checking and value retrieval.

It also removes `has_ima` for now because it's redundant if we only need
to test for single base behavior.
This updates the rust-version file to 040e2f8.
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 040e2f8
Filtered ref: cf4d00a666607e356e410a820ae07eeba28a9b53

This merge was created using https://github.com/rust-lang/josh-sync.
Perform the first rustc pull.. for the second time
Make sure that compiler and linker don't optimize the section's contents
away by adding the global holding the data to "llvm.used". This
eliminates the need for a volatile load in the main shim; since the LLVM
codegen backend is the only implementer of the corresponding trait
function, remove it entirely.
Since rust-lang#143048, we now explicitly set the build compiler for `check::Std`, which caused it to be built before we checked `--skip-std-check-if-no-download-rustc`. So I moved the check earlier to `make_run`, which resolves it.

I also added a regression test for this. Sadly we can't really test for the positive case easily (when download-ci-rustc is enabled), but we can test the negative cases, where it is disabled.
In the suggestion machinery for borrowing expressions and types, always use the available obligation `Span` to find the appropriate `Expr` to perform appropriateness checks no the `ExprKind` instead of on the textual snippet corresponding to the `Span`.

Unify the logic for the case where `&` *and* `&mut` are appropriate with the logic for only one of those cases.

Handle the case when `S::foo()` should have been `<&S>::foo()` (instead of suggesting the prior `&S::foo()`.
tgross35 added 7 commits July 10, 2025 17:42
stdarch subtree update

Subtree update of `stdarch` to rust-lang/stdarch@b262a9a.

Created using https://github.com/rust-lang/josh-sync.

r? ``@ghost``
…b-scripts-section, r=bjorn3

Preserve the .debug_gdb_scripts section

Make sure that compiler and linker don't optimize the section's contents away by adding the global holding the data to `llvm.used`. This eliminates the need for a volatile load in the main shim; since the LLVM codegen backend is the only implementer of the corresponding trait function, remove it entirely.

r? ``@bjorn3``
…ouxu

Fix `--skip-std-check-if-no-download-rustc`

Since rust-lang#143048, we now explicitly set the build compiler for `check::Std`, which caused it to be built before we checked `--skip-std-check-if-no-download-rustc`. So I moved the check earlier to `make_run`, which resolves it.

I also added a regression test for this. Sadly we can't really test for the positive case easily (when download-ci-rustc is enabled), but we can test the negative cases, where it is disabled.

Fixes: rust-lang#143705

r? ``@RalfJung``
Make some "safe" llvm ops actually sound

Noticed while doing other refactorings

it may cause some extra unnecessary allocations, but the current use sites are rare ones anyway
…extraction, r=petrochenkov

Resolve refactor: extraction of `finalize_module_binding` and `single_import_can_define_name`

This pr the work Vadim asked for in rust-lang#142547 (comment). This part:
> finalize_module_binding/single_import_can_define_name extraction

Cherry-picked commits of b-naber. Extraction of 2 processes in `resolve_ident_in_module_unadjusted`:
- `finalize_module_binding`
- `single_import_can_define_name`

r? ``@petrochenkov``
…iler-errors

Rework borrowing suggestions to use `Expr` instead of just `Span`

In the suggestion machinery for borrowing expressions and types, always use the available obligation `Span` to find the appropriate `Expr` to perform appropriateness checks no the `ExprKind` instead of on the textual snippet corresponding to the `Span`. (We were already doing this, but only for a subset of cases.) This now better handles situations where parentheses and `<>` are needed for correct syntax (`&(foo + bar)`, `(&foo).bar()`, `<&Foo>::bar()`, etc.).

Unify the logic for the case where `&` *and* `&mut` are appropriate with the logic for only one of those cases. (Instead of having two branches for emitting the suggestion, we now have a single one, using `Diag::multipart_suggestions` always.)

Handle the case when `S::foo()` should have been `<&S>::foo()` (instead of suggesting the prior `&S::foo()`. Fix rust-lang#143393.

Make `Diag::multipart_suggestions` always verbose. CC rust-lang#141973.
…compiler-errors

Properly track the depth when expanding free alias types

Decrease the depth after the fold so as not to affect the depth for unrelated same-level constituent types. My bad.

Fixes rust-lang#142419.
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc F-autodiff `#![feature(autodiff)]` 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. labels Jul 10, 2025
@tgross35
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rustbot rustbot added the rollup A PR which is a rollup label Jul 10, 2025
@bors
Copy link
Collaborator

bors commented Jul 10, 2025

📌 Commit fba04fa has been approved by tgross35

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 Jul 10, 2025
@bors
Copy link
Collaborator

bors commented Jul 10, 2025

⌛ Testing commit fba04fa with merge 7f01dc1...

bors added a commit that referenced this pull request Jul 10, 2025
Rollup of 8 pull requests

Successful merges:

 - #140136 (Add an aarch64-msvc build running on ARM64 Windows)
 - #143642 (stdarch subtree update)
 - #143679 (Preserve the .debug_gdb_scripts section)
 - #143707 (Fix `--skip-std-check-if-no-download-rustc`)
 - #143722 (Make some "safe" llvm ops actually sound)
 - #143728 (Resolve refactor: extraction of `finalize_module_binding` and `single_import_can_define_name`)
 - #143742 (Rework borrowing suggestions to use `Expr` instead of just `Span`)
 - #143744 (Properly track the depth when expanding free alias types)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-i586-gnu-i586-i686-musl failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

---- [debuginfo-gdb] tests/debuginfo/embedded-visualizer.rs stdout ----
NOTE: compiletest thinks it is using GDB version 12001000

error: check directive(s) from `/checkout/tests/debuginfo/embedded-visualizer.rs` not found in debugger output. errors:
    (embedded-visualizer.rs:50) `Yes     pretty-printer-embedded_visualizer-0`
    (embedded-visualizer.rs:51) `Yes     pretty-printer-embedded_visualizer-1`
    (embedded-visualizer.rs:53) `$1 = (0, 0)`
    (embedded-visualizer.rs:55) `$2 = (5, 8)`
    (embedded-visualizer.rs:57) `$3 = ((0, 0), (5, 8))`
    (embedded-visualizer.rs:59) `$4 = "Person A" is 10 years old.`
status: exit status: 0
command: PYTHONPATH="/checkout/src/etc" "/usr/bin/gdb" "-quiet" "-batch" "-nx" "-command=/checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/embedded-visualizer.gdb/embedded-visualizer.debugger.script"
--- stdout -------------------------------
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Breakpoint 1 at 0x1e64: file /checkout/tests/debuginfo/embedded-visualizer.rs, line 106.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, embedded_visualizer::main () at /checkout/tests/debuginfo/embedded-visualizer.rs:106
106     zzz(); // #break
Loaded  Script                                                                 
Yes     gdb_load_rust_pretty_printers.py                                       
 full name: /checkout/src/etc/gdb_load_rust_pretty_printers.py
$1 = embedded_visualizer::point::Point {x: 0, y: 0}
$2 = embedded_visualizer::point::Point {x: 5, y: 8}
$3 = embedded_visualizer::Line {a: embedded_visualizer::point::Point {x: 0, y: 0}, b: embedded_visualizer::point::Point {x: 5, y: 8}}
$4 = dependency_with_embedded_visualizers::Person {name: "Person A", age: 10}
A debugging session is active.

 Inferior 1 [process 470196] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
------------------------------------------
stderr: none



@bors
Copy link
Collaborator

bors commented Jul 11, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 11, 2025
@tgross35 tgross35 closed this Jul 11, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 11, 2025
@tgross35 tgross35 deleted the rollup-clvq7yu branch July 11, 2025 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc F-autodiff `#![feature(autodiff)]` rollup A PR which is a rollup 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.