306648 Commits

Author SHA1 Message Date
Stuart Cook
743f70b6e8
Rollup merge of #146663 - erickt:win, r=wesleywiser
Allow windows resource compiler to be overridden

In rust-lang/rust#146018, it is now required to provide a resource compiler on windows when compiling rust. This allows toolchain builders to explicitly provide a path to an alternative, such as llvm-rc, instead of the one that's provided by the Windows SDK.

cc ```@lambdageek```
2025-09-19 22:31:53 +10:00
Stuart Cook
aa2bb56ba6
Rollup merge of #146638 - lcnr:canonical-separate-module, r=BoxyUwU
`rustc_next_trait_solver`: canonical out of `EvalCtxt`

we need to canonicalize outside of the trait solver as well, so it's just a lot nicer if canonicalization is more easily accessible

if you review it commit by commit the move is properly shown
2025-09-19 22:31:52 +10:00
Stuart Cook
19211dfd0f
Rollup merge of #146615 - a4lg:codegen-llvm-feature-conversion-tidying, r=workingjubilee
rustc_codegen_llvm: Feature Conversion Tidying

The author thinks we can improve `to_llvm_features`, a function to convert a Rust target feature name into an LLVM feature (or nothing, to ignore features unsupported by LLVM) for better maintainability.

1.  We can simplify some clauses and some expressions.
2.  There are some readability issues.

This PR attempts to resolve some of them by tidying many cases.
2025-09-19 22:31:51 +10:00
Stuart Cook
ff8d63ae43
Rollup merge of #146541 - joboet:simplify-lookup-host, r=tgross35
std: simplify host lookup

The logic for splitting up a string into a hostname and port is currently duplicated across (nearly) all of the networking implementations in `sys`. Since it does not actually rely on any system internals, this PR moves it to the `ToSocketAddr` implementation for `&str`, making it easier to discover and maintain.

On the other hand, the `ToSocketAddr` implementation (or rather the `resolve_socket_addr` function) contained logic to overwrite the port on the socket addresses returned by `LookupHost`, even though `LookupHost` is already aware of the port and sets the port already on Xous. This PR thus removes this logic by moving the responsibility of setting the port to the system-specific `LookupHost` implementation.

As a consequence of these changes, there remains only one way of creating `LookupHost`, hence I've removed the `TryFrom` implementations in favour of a `lookup_host` function, mirroring other, public iterator-based features.

And finally, I've simplified the parsing logic responsible for recognising IP addresses passed to `<(&str, u16)>::to_socket_addrs()` by using the `FromStr` impl of `IpAddr` rather than duplicating the parsing for both IP versions.
2025-09-19 22:31:51 +10:00
Stuart Cook
fe0b51939c
Rollup merge of #146484 - notriddle:stringdex-js-opt, r=GuillaumeGomez
rustdoc-search: JavaScript optimization based on Firefox Profiler output

Part of https://github.com/rust-lang/rust/issues/146048

Preview: https://notriddle.com/rustdoc-html-demo-12/stringdex-js-opt/std/index.html

These commits are based on some profiler readings, and should reduce CPU usage for name-based searching.

- The first commit improves warm searches by allocating less garbage when data is already loaded:

  Before: https://profiler.firefox.com/public/wvzd88m8r70p8frvz1z628tv3htwna0b9c0ef10/calltree/?globalTrackOrder=0w2&implementation=js&thread=3&v=11

  After: https://profiler.firefox.com/public/yfe9aq6ep3kacw3zmr7jqn6gv7ckfq86rg89568/calltree/?globalTrackOrder=0w2&implementation=js&thread=3&v=11

- The second commit improves cold searches by delaying load for special type names until type-based search runs

  Before: 5.86s (throttled to "Good 2G" in Dev Tools) <https://doc.rust-lang.org/nightly/std/index.html?search=>

  <img width="2524" height="919" alt="image" src="https://github.com/user-attachments/assets/8dbbbd46-b7ab-4e3c-9e8c-f1e41cfaa968" />

  After: 5.77s (throttled to "Good 2G" in Dev Tools) <https://notriddle.com/rustdoc-html-demo-12/stringdex-js-opt/std/index.html?search=>

  <img width="2524" height="912" alt="image" src="https://github.com/user-attachments/assets/6976a584-24f4-4d47-8118-7a81b22d411e" />

  For comparison's sake, the same test takes 12.17s on stable <https://doc.rust-lang.org/1.89.0/std/index.html?search=>

    <img width="2525" height="916" alt="image" src="https://github.com/user-attachments/assets/eb6df2e8-6632-4bef-a6d0-5179c6288fd0" />
2025-09-19 22:31:50 +10:00
Stuart Cook
ac9b55e439
Rollup merge of #146229 - Hayden602:issue-142796-fix, r=ZuseZ4
Automatically switch to lto-fat when flag RUSTFLAGS="- Zautodiff=Enable" is set

…t" is automatically set.

closes: [#142796](https://github.com/rust-lang/rust/issues/142796)
2025-09-19 22:31:49 +10:00
bors
e10aa88911 Auto merge of #145737 - cjgillot:gvn-valueset, r=saethlin
GVN: stop hashing opaque values

GVN generates values that are not meant to be unified with any other. For instance `Opaque` (aka we don't know anything), non-deterministic constants and borrows.

The current algorithm generates a unique index, so the generated `Value` will be different from all the existing. This is wasteful, as we should not hash that `Value` at all.

This PR proposes to do this. This involves partially reimplementing a `FxIndexSet`, but yields a small but consistent perf improvement (https://github.com/rust-lang/rust/pull/145737#issuecomment-3276951054).
2025-09-19 12:15:03 +00:00
Mads Marquart
37be93497e Fix test suite in iOS/tvOS/watchOS/visionOS simulator 2025-09-19 13:55:03 +02:00
Mads Marquart
b30c1b53f3 Document how to test with iOS/tvOS/watchOS/visionOS simulator 2025-09-19 13:55:02 +02:00
joboet
09d3120a99
std: simplify host lookup 2025-09-19 11:30:27 +02:00
Ralf Jung
0dac2f06fa
Merge pull request #4594 from RalfJung/clippy
fix clippy warning: use if let
2025-09-19 09:07:57 +00:00
Mads Marquart
be01d87ba2 Allow running remote-test-server on Apple simulators 2025-09-19 10:52:53 +02:00
Ralf Jung
7506352af0 fix clippy warning 2025-09-19 10:41:56 +02:00
Ralf Jung
1db74d4845 fix miri bootstrap build 2025-09-19 09:02:03 +02:00
A4-Tacks
f69da33049
Add #[track_caller] for check_assist_by_label 2025-09-19 13:39:45 +08:00
许杰友 Jieyou Xu (Joe)
72b0291829
Merge pull request #2580 from rust-lang/tshepang-patch-2
point to Compiler team docs on Forge
2025-09-19 13:25:23 +08:00
Laurențiu Nicola
fefecbcd03
Merge pull request #20699 from lnicola/ena-fingerprint
minor: Set `WithCachedTypeInfo::stable_hash` when in-tree
2025-09-19 05:20:01 +00:00
Laurențiu Nicola
6870e24fdb Set WithCachedTypeInfo::stable_hash when in-tree 2025-09-19 08:08:23 +03:00
beepster4096
7ce81d1453 deref related cleanups in ref_prop 2025-09-18 19:55:40 -07:00
Sidney Cammeresi
934ee043fe
Plumb Allocator generic into std::vec::PeekMut 2025-09-18 17:29:23 -07:00
bors
2f4dfc753f Auto merge of #137122 - yotamofek:pr/std/iter-eq-exact-size, r=the8472
Specialize `Iterator::eq{_by}` for `TrustedLen` iterators

I'm sure I got some stuff wrong here, but opening this to get feedback and make sure it's a viable idea at all.

### Motivation
I had a piece of code that open-coded `Iterator::eq`, something like:
```rust
if current.len() != other.len()
    || current.iter().zip(other.iter()).any(|(a, b)| a != b) { ... }
```
... where both `current` and `other` are slices of the same type.
Changing the code to use `current.iter().eq(other)` made it a lot slower, since it wasn't checking the length of the two slices beforehand anymore, which in this instance made a big difference in perf. So I thought I'd see if I can improve `Iterator::eq`.

### Questions
1. I can't specialize for `ExactSizeIterator`, I think it's a limitation of `min_specialization` but not sure exactly why. Is specializing for `TrustedLen` good enough?
2. Should I make a codegen test for this? If so, then how? (I manually checked the assembly to make sure it works as expected)
3. Where should I put `SpecIterCompare`?
4. Can I get a perf run for this, please? I think the compiler uses this in a few places, so it might have an affect.
2025-09-18 23:11:24 +00:00
Oblarg
47d6936c7d fix negative const generic integer literals 2025-09-18 18:55:13 -04:00
lcnr
b83c0f0e94 canonical: yeet EvalCtxt, mk Canonicalizer private 2025-09-18 23:56:20 +02:00
lcnr
a08e6499e6 move mod canonical out of eval_ctxt 2025-09-18 23:56:20 +02:00
Ralf Jung
7af6e590a4 update lockfile 2025-09-18 23:33:38 +02:00
Ralf Jung
11ffdb54f6
Merge pull request #4592 from RalfJung/sqrt
implement sqrt for f16 and f128
2025-09-18 20:47:26 +00:00
Guillaume Gomez
9819ceae94
Merge pull request #2587 from GuillaumeGomez/gcc-backend-missing-docs
Add missing documentation for running tests with GCC backend
2025-09-18 22:27:15 +02:00
beepster4096
45e5c765c6 fix tidy spellchecking on windows 2025-09-18 13:17:39 -07:00
Ralf Jung
77f2d86554 share sqrt implemention across float types 2025-09-18 22:17:29 +02:00
bors
7c275d09ea Auto merge of #146728 - flip1995:clippy-subtree-update, r=samueltardieu
Clippy subtree update

r? `@Manishearth`

`Cargo.lock` update due to release/Clippy version bump.
2025-09-18 20:03:58 +00:00
Ralf Jung
f19b560fa9 implement sqrt for f16 and f128 2025-09-18 22:02:46 +02:00
Yotam Ofek
eb7abeb261 Specialize Iterator::eq[_by] for TrustedLen iterators 2025-09-18 22:47:54 +03:00
Ralf Jung
045e5e3586
Merge pull request #4583 from Patrick-6/miri-genmc-estimation
Add GenMC estimation mode.
2025-09-18 19:40:26 +00:00
Shoyu Vanilla (Flint)
c68acff6eb
Merge pull request #20695 from ShoyuVanilla/fix-another-in-tree
fix: Fix one more thing in `in-rust-tree`
2025-09-18 19:34:53 +00:00
Shoyu Vanilla
01cd04f78d fix: Fix one more thing in in-rust-tree 2025-09-19 04:20:24 +09:00
Ralf Jung
00bfe9ce6e tweak genmc error report note 2025-09-18 20:41:06 +02:00
Laurențiu Nicola
9348de05d7
Merge pull request #20694 from ShoyuVanilla/bump-rustc
minor: Yet another rustc crates bump
2025-09-18 18:38:03 +00:00
Shoyu Vanilla
3ba8b8e0e5 minor: Yet another rustc crates bump 2025-09-19 03:26:03 +09:00
Laurențiu Nicola
ddbfd3a1d8
Merge pull request #20693 from ShoyuVanilla/fix-indexmap-in-tree
fix: Fix `indexmap` with `in-rust-tree`
2025-09-18 18:16:41 +00:00
Shoyu Vanilla
60f0407ba3 fix: Fix indexmap with in-rust-tree 2025-09-19 03:04:14 +09:00
bors
0c0c58b8e4 Auto merge of #146727 - matthiaskrgr:rollup-98812uj, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#146434 (c-variadic: allow c-variadic inherent and trait methods)
 - rust-lang/rust#146487 (Improve `core::num` coverage)
 - rust-lang/rust#146597 (Add span for struct tail recursion limit error)
 - rust-lang/rust#146622 (Add regression test for issue rust-lang/rust#91831)
 - rust-lang/rust#146717 (Clean up universe evaluation during type test evaluation)
 - rust-lang/rust#146723 (Include patch in release notes)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-18 16:55:05 +00:00
Erick Tryzelaar
7f55f5761c Allow windows resource compiler to be overridden
It is now required to provide a resource compiler on windows when
compiling rust. This allows toolchain builders to explicitly provide a
path to an alternative, such as llvm-rc, instead of the one that's
provided by the Windows SDK.
2025-09-18 16:50:02 +00:00
Shoyu Vanilla (Flint)
4f24cc65ee
Merge pull request #20691 from lnicola/bump-rustc-again
minor: Bump rustc crates again
2025-09-18 16:14:50 +00:00
Laurențiu Nicola
c6b4f6f33f Bump rustc crates again 2025-09-18 19:03:35 +03:00
Philipp Krones
5d1619b3ec
Update Cargo.lock 2025-09-18 17:21:54 +02:00
Philipp Krones
1bfe3bcfec
Merge commit '20ce69b9a63bcd2756cd906fe0964d1e901e042a' into clippy-subtree-update 2025-09-18 17:21:44 +02:00
Matthias Krüger
24d6259dce
Rollup merge of #146723 - Mark-Simulacrum:relnotes-fix, r=Kobzol
Include patch in release notes

This should fix triagebot publication of the GitHub release on merge.
2025-09-18 17:20:59 +02:00
Matthias Krüger
3afe1cab09
Rollup merge of #146717 - amandasystems:remove-placeholder-hack, r=lcnr
Clean up universe evaluation during type test evaluation

The logic was, as the removed comments suggest, hackish and meant to implement previous logic that was factored out. The new logic does exactly what the comments say, and is much less surprising.

I'm afraid we may want

r? `@lcnr`

for this one too.

I am sorry, but at least it should be easier to review.
2025-09-18 17:20:59 +02:00
Matthias Krüger
f28730fcd4
Rollup merge of #146622 - aklaiber:91831_add_regression_test, r=jdonszelmann
Add regression test for issue #91831

The requested test for rust-lang/rust#91831. I'm unsure about the filename, the file structure in `tests/ui/lifetimes/lifetime-errors/` isn't entirely clear to me. Any suggestions?

Closes rust-lang/rust#91831
2025-09-18 17:20:58 +02:00
Matthias Krüger
b7ab58eb4d
Rollup merge of #146597 - modhanami:add-struct-tail-recursion-limit-span, r=oli-obk
Add span for struct tail recursion limit error

Fixes rust-lang/rust#135629

Changes
1. Add span to RecursionLimitReached
2. Add ObligationCause parameter to struct_tail_raw
4. Update call sites to pass nearby ObligationCause or create one
5. Update affected .stderr
2025-09-18 17:20:57 +02:00