Skip to content

Rustc pull update #2464

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

Merged
merged 26 commits into from
Jun 12, 2025
Merged

Rustc pull update #2464

merged 26 commits into from
Jun 12, 2025

Conversation

github-actions[bot]
Copy link

Latest update from rustc.

matthiaskrgr and others added 26 commits June 9, 2025 13:55
rustc-dev-guide subtree update

r? `@ghost`
Run `calculate_matrix` job on `master` to cache citool builds

As discussed in https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/PR.20ci.20seems.20much.20to.20slow/with/523028903, the current `rust-cache` solution for `citool` doesn't work, because we don't ever write to the cache from `master`, so the cache is empty on PR CI jobs.

This PR runs the `calculate_matrix` job on `master`, with the only motivation to actually prime the cache.

r? `@marcoieni`
add `Cargo.lock` to CI-rustc allowed list for non-CI env

Changes to dependencies usually require modifying `Cargo.toml`, which would already invalidate the CI-rustc cache if done in non-allowed paths. On non-CI environment, it should be safe to add `Cargo.lock` to the list of allowed paths as there is no real risk aside from a very rare false positive in cases like minor bumps to non-allowed path dependencies without modifying the `Cargo.toml` files.

Fixes rust-lang/rust#141986
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#129121 (Stabilize `tcp_quickack`)
 - rust-lang/rust#142192 (De-duplicate f16 & f128 doctest attributes)
 - rust-lang/rust#142193 (add tests for pattern binding drop order edge cases)
 - rust-lang/rust#142222 (Dont make `ObligationCtxt`s with diagnostics unnecessarily)
 - rust-lang/rust#142228 (rustc-dev-guide subtree update)
 - rust-lang/rust#142231 (Run `calculate_matrix` job on `master` to cache citool builds)
 - rust-lang/rust#142232 (add `Cargo.lock` to CI-rustc allowed list for non-CI env)

r? `@ghost`
`@rustbot` modify labels: rollup
…RalfJung

Enable Non-determinism of float operations in Miri and change std tests

Links to [#4208](rust-lang/miri#4208) and [#3555](rust-lang/miri#3555) in Miri.

Non-determinism of floating point operations was disabled in rust-lang/rust#137594 because it breaks the tests and doc-tests in core/coretests and std. This PR enables some of them.

This pr includes the following changes:

- Enables the float non-determinism but with a lower relative error of 4ULP instead of 16ULP
- These operations now have a fixed output based on the C23 standard, except the pow operations, this is tracked in [#4286](rust-lang/miri#4286 (comment))
- Changes tests that made incorrect assumptions about the operations, not to make that assumption anymore (from `assert_eq!` to `assert_approx_eq!`.
- Changed the doctests of the stdlib of these operations to compare against fixed constants instead of `f*::EPSILON`, which now succeed with Miri and `-Zmiri-many-seeds`
- Added a constant `APPROX_DELTA` in `std/tests/floats/f32.rs` which is used for approximation tests, but with a different value when run in Miri. This is to make these tests succeed.
- Added tests in the float tests of Miri to test the C23 behaviour.

Fixes rust-lang/miri#4208
Subtree update of `rust-analyzer`

r? `@ghost`
Update cargo

18 commits in 64a12460708cf146e16cc61f28aba5dc2463bbb4..fc1518ef02b77327d70d4026b95ea719dd9b8c51
2025-05-30 18:25:08 +0000 to 2025-06-06 04:49:44 +0000
- fix: Make UI tests handle hyperlinks consistently (rust-lang/cargo#15640)
- Update "time out" to "timeout" (rust-lang/cargo#15637)
- fix(workspace): reload current manifest path member only (rust-lang/cargo#15633)
- Update dependencies (rust-lang/cargo#15635)
- fix(publish): Don't tell people to ctrl-c without knowing consequences  (rust-lang/cargo#15632)
- refactor: clean up `clippy::perf` lint warnings (rust-lang/cargo#15631)
- fix(package): Skip registry check if its not needed (rust-lang/cargo#15629)
- Add --offline for comp (rust-lang/cargo#15623)
- cargo-credential-libsecret: load libsecret only once (rust-lang/cargo#15295)
- test(publish): Improvements in prep for `-Zpackage-workspace` stabilization (rust-lang/cargo#15628)
- fix(package): Allow packaging of self-cycles with -Zpackage-workspace (rust-lang/cargo#15626)
- docs: clarify `--all-features` not available for all commmands (rust-lang/cargo#15572)
- Remove double reference in Shell::print_json (rust-lang/cargo#15460)
- fix(trim-paths): remap all paths to `build.build-dir` (rust-lang/cargo#15614)
- test(trim-paths): enable more tests for windows-msvc (rust-lang/cargo#15621)
- fix(fingerprint): explicit reason rather than "stale; unknown reason" (rust-lang/cargo#15617)
- Fix cargo add overwriting symlinked Cargo.toml files (rust-lang/cargo#15281)
- chore(deps): update alpine docker tag to v3.22 (rust-lang/cargo#15616)

r? ghost
mir-opt: Do not create storage marks in EarlyOtherwiseBranch

Fixes #141212.

The first commit add `StorageDead` by creating new indirect BB that makes CFG more complicated, but I think it's better to just not create storage marks.

r? mir-opt
Make root vars more stable

Never resolve a ty/ct vid to a higher vid as its root. This should make the optimization in rust-lang/rust#141500 more "stable" when there are a lot of vars flying around.

r? `@ghost`
`FIXME(-Znext-solver)` triage

r? `@BoxyUwU`
Configure bootstrap backport nominations through triagebot

Following the discussion in [#t-infra/bootstrap > ✔ Have triagebot create backport nomination threads?](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/.E2.9C.94.20Have.20triagebot.20create.20backport.20nomination.20threads.3F/with/521876500) where we noticed that bootstrap backport nominations were difficult to track, since:

- We don't really have a dedicated person / group of people checking for bootstrap backport nominations.
- We don't really have an establish way of handling bootstrap backports.

This PR configures triagebot to open backport nominations threads (indicated for bootstrap team if a given PR has the suitable team label, https://github.com/rust-lang/rust/labels/T-bootstrap) in [#t-infra/bootstrap/backports](https://rust-lang.zulipchat.com/#narrow/channel/507486-t-infra.2Fbootstrap.2Fbackports). The current configuration is such that **the whole bootstrap team will be pinged for bootstrap backport nominations**[^diverges].

### Steps

- [x] ~~Ping members who opt-in subscribe to backport channel, or ping the whole bootstrap team?~~
    - Poll: [#t-infra/bootstrap > Have triagebot create backport nomination threads? @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Have.20triagebot.20create.20backport.20nomination.20threads.3F/near/522141337)
    - Votes (as of 2025-06-10): 3 votes "no preference", 1 vote "in favor".
- [x] ~~(Best for follow-up) Maybe also document bootstrap team's backport process / decision process in Forge? It's a bit different from [compiler team's backport process](https://forge.rust-lang.org/compiler/backports.html) because we don't have weekly bootstrap triage meetings and thus don't have sync backport decisions.~~
    - Tracked as follow-up in Forge: rust-lang/rust-forge#889.

---

r? Kobzol

[^diverges]: Note that this configuration is similar to the types team backport nominations, but diverges from the compiler team.
Implement `//@ needs-target-std` compiletest directive

Closes rust-lang/rust#141863.
Needed to unblock rust-lang/rust#139244 and rust-lang/rust#141856.

### Summary

This PR implements a `//@ needs-target-std` compiletest directive that gates test execution based on whether the target supports std or not. For some cases, this should be preferred over e.g. some combination of `//@ ignore-none`, `//@ ignore-nvptx` and more[^none-limit].

### Implementation limitation

Unfortunately, since there is currently [no reliable way to determine from metadata whether a given target supports std or not](rust-lang/rust#142296), we have to resort to a hack. Bootstrap currently determines whether or not a target supports std by a naive target tuple substring comparison: a target supports std if its target tuple does *not* contain one of `["-none", "nvptx", "switch"]` substrings. This PR simply pulls that hack out into `build_helpers` to avoid reimplementing the same hack in compiletest, and uses that logic to inform `//@ needs-target-std`.

### Auxiliary changes

This PR additionally changes a few run-make tests to use `//@ needs-target-std` over an inconsistent combination of target-based `ignore`s. This should help with rust-lang/rust#139244.

---

r? bootstrap

[^none-limit]: Notably, `target_os = "none"` is **not** a sufficient condition for "target does not support std"
…dead

Make loongarch-none target maintainers more easily pingable

In the same style as rust-lang/rust#139028.
r? compiler
… r=lcnr

Dont unwrap and re-wrap typing envs

Just a tiny tweak to make the query less awkward.

r? lcnr
Remove unneeded `FunctionCx` from some codegen methods

No changes; just removing the `self` that wasn't needed.

r? workingjubilee
cc rust-lang/rust#138759 (comment)
feat: Add `bit_width` for unsigned integer types

- Accepted ACP: rust-lang/libs-team#598
- Tracking issue: rust-lang/rust#142326

This PR adds methods to the primitive unsigned integer types that return the minimum number of bits required to represent an unsigned integer.
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#141967 (Configure bootstrap backport nominations through triagebot)
 - rust-lang/rust#142042 (Make E0621 missing lifetime suggestion verbose)
 - rust-lang/rust#142272 (tests: Change ABIs in tests to more future-resilient ones)
 - rust-lang/rust#142282 (Only run `citool` tests on the `auto` branch)
 - rust-lang/rust#142297 (Implement `//@ needs-target-std` compiletest directive)
 - rust-lang/rust#142298 (Make loongarch-none target maintainers more easily pingable)
 - rust-lang/rust#142306 (Dont unwrap and re-wrap typing envs)
 - rust-lang/rust#142324 (Remove unneeded `FunctionCx` from some codegen methods)
 - rust-lang/rust#142328 (feat: Add `bit_width` for unsigned integer types)

Failed merges:

 - rust-lang/rust#141639 (Expose discriminant values in stable_mir)

r? `@ghost`
`@rustbot` modify labels: rollup
Faster fmt::Display of 128-bit integers, without unsafe pointer

In followup of #135265, hereby the 128-bit part.

* Batches per 16 instead of 19 digits
* Buffer access as array insteaf of unsafe pointer
* Added test coverage for i128 and u128

r? tgross35 ChrisDenton
@rustbot
Copy link
Collaborator

rustbot commented Jun 12, 2025

Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide or r? <username>.

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Jun 12, 2025
@rustbot rustbot closed this Jun 12, 2025
@rustbot rustbot reopened this Jun 12, 2025
@tshepang tshepang merged commit 6966390 into master Jun 12, 2025
1 check passed
@tshepang tshepang deleted the rustc-pull branch June 12, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants