306590 Commits

Author SHA1 Message Date
bors
b00998aaa5 Auto merge of #146771 - Kobzol:download-ci-llvm-default-value, r=jieyouxu
Simplify default value of `download-ci-llvm`

Just set it to true, rather than having different default values on CI and locally, and then only deny `true` on our own CI, not elsewhere.

Closes: https://github.com/rust-lang/rust/issues/146768

r? `@jieyouxu`
2025-09-20 08:04:38 +00:00
Ralf Jung
f3427c50c2 clippy 2025-09-20 09:34:51 +02:00
Laurențiu Nicola
0afd767bac
Merge pull request #20707 from lnicola/bump-rustc
minor: Bump rustc crates once more
2025-09-20 06:50:11 +00:00
Laurențiu Nicola
4d8655e8d0 Bump rustc crates once more 2025-09-20 09:38:53 +03:00
The Miri Cronjob Bot
340c6e76ec Merge ref 'ec3867107526' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: ec38671075266e9cee0348701da2e133379e7c6c
Filtered ref: ed8e25574abf50600d9d2fd61eda90708ccce6c2
Upstream diff: 3f1552a273...ec38671075

This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-20 05:00:06 +00:00
The Miri Cronjob Bot
88ceae98c5 Prepare for merging from rust-lang/rust
This updates the rust-version file to ec38671075266e9cee0348701da2e133379e7c6c.
2025-09-20 04:52:31 +00:00
bors
e4b521903b Auto merge of #146621 - cammeresi:peek-20250915, r=Amanieu
Make `PeekMut` generic over the allocator

- plumb in allocator generic
- additional testing

Related: rust-lang/rust#122742
2025-09-20 04:43:19 +00:00
Sidney Cammeresi
42b38e3781
Add unstable attribute to BTreeMap-related allocator generics
Although these types aren't directly constructable externally, since
they're pub, I think this omission was an oversight.
2025-09-19 21:32:15 -07:00
Josh Triplett
a54111a548 mbe: metavar expressions: Use symbols rather than ident.as_str()
Identify metavariable functions by using named symbols rather than
string comparisons.
2025-09-20 10:38:36 +08:00
Josh Triplett
fc41c38379 mbe: Factor out a function to transcribe a ParseNtResult 2025-09-20 10:38:36 +08:00
Josh Triplett
bb430f8e1e mbe: Simplify match in transcribe_metavar
Factor out the check for a variable that's still repeating.
2025-09-20 10:38:36 +08:00
Thalia Archibald
db4d4eff56 Update cfg_if! to cfg_select!
The macro is now builtin.
2025-09-19 19:18:10 -06:00
Thalia Archibald
776c199c7b Fix std build for xtensa 2025-09-19 19:18:10 -06:00
Thalia Archibald
6a5838105d Fix unsupported std::sys::thread
Fixes building std for any platform with an unsupported thread
abstraction. This includes {aarch64,armv7,x86_64}-unknown-trusty and
riscv32im-risc0-zkvm-elf, which explicitly include the unsupported
module, and platforms with no PAL.

Bug fix for PR 145177 (std: move thread into sys).
2025-09-19 19:18:10 -06:00
Deadbeef
4841d8c5ff generate list of all variants with target_spec_enum
This helps us avoid the hardcoded lists elsewhere.
2025-09-19 22:14:50 +00:00
bors
ec38671075 Auto merge of #146797 - matthiaskrgr:rollup-xy0g8n7, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#146690 (add `[const] PartialEq` bound to `PartialOrd`)
 - rust-lang/rust#146776 (fixes for numerous clippy warnings)
 - rust-lang/rust#146777 (fix ./x readdir logic when CDPATH is set)
 - rust-lang/rust#146781 (mbe: Fix feature gate for `macro_derive`)
 - rust-lang/rust#146785 (btree: safety comments for init and new)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-19 21:41:28 +00:00
Marijn Schouten
54b15a66d8 fixes for numerous clippy warnings 2025-09-19 20:56:07 +00:00
Matthias Krüger
6f9e6c9935
Rollup merge of #146785 - hkBst:btree-1, r=joboet
btree: safety comments for init and new
2025-09-19 22:53:56 +02:00
Matthias Krüger
02faee6044
Rollup merge of #146781 - joshtriplett:mbe-derive-fix-feature-gate, r=wesleywiser
mbe: Fix feature gate for `macro_derive`
2025-09-19 22:53:56 +02:00
Matthias Krüger
dc3c62a179
Rollup merge of #146777 - RalfJung:x-cdpath, r=Kobzol
fix ./x readdir logic when CDPATH is set

Fixes https://github.com/rust-lang/rust/issues/146769
r? ``@Kobzol``
2025-09-19 22:53:55 +02:00
Matthias Krüger
29f39426c5
Rollup merge of #146776 - hkBst:clippy-fix-12, r=jdonszelmann
fixes for numerous clippy warnings
2025-09-19 22:53:55 +02:00
Matthias Krüger
96a4ae3ab9
Rollup merge of #146690 - npmccallum:convo, r=tgross35
add `[const] PartialEq` bound to `PartialOrd`

This change is included for discussion purposes.

The PartialOrd bound on PartialEq is not strictly necessary. It is, rather, logical: anything which is orderable should by definition have equality. Is the same true for constness? Should every type which is const orderable also have const equality?
2025-09-19 22:53:54 +02:00
Alex Crichton
f354d93abe Enable limit_rdylib_exports on wasm targets
This commit updates the target specification of wasm targets to set the
`limit_rdylib_exports` value to `true` like it is on other native
platforms. This was originally not implemented long ago as `wasm-ld`
didn't have options for symbol exports, but since then it's grown a
`--export` flag and such to control this. A custom case is needed in the
linker implementation to handle wasm targets as `wasm-ld` doesn't
support linker scripts used on other targets, but other than that the
implementation is straightforward.

The goal of this commit is enable building dynamic libraries on
`wasm32-wasip2` which don't export every single symbol in the Rust
standard library. Currently, without otherwise control over symbol
visibility, all symbols end up being exported which generates
excessively large binaries because `--gc-sections` ends up doing nothing
as it's all exported anyway.
2025-09-19 13:16:38 -07:00
Folkert de Vries
b27942853e
naked_asm: emit a label starting with func_end
The `cargo asm` tool pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient
2025-09-19 21:53:06 +02:00
Daniel Paoliello
4da59355fd [win] Use find-msvc-tools instead of cc to find the linker and rc on Windows 2025-09-19 12:00:30 -07:00
bors
0be8e16088 Auto merge of #146700 - Zalathar:quoted-args, r=nikic
cg_llvm: Move target machine command-line quoting from C++ to Rust

When this code was introduced in rust-lang/rust#130446 and rust-lang/rust#131805, it was complicated by the need to maintain compatibility with earlier versions of LLVM.

Now that LLVM 20 is the baseline (rust-lang/rust#145071), we can do all of the quoting in pure Rust code, and pass two flat strings to LLVM to be used as-is.

---

In this PR, my priority has been to preserve the existing behaviour as much as possible, without worrying too much about what the behaviour *should* be. (Though I did avoid a leading space before the first argument.)
2025-09-19 18:32:17 +00:00
Scott Schafer
4f02ec2cea
test: Use SVG for terminal url test 2025-09-19 12:28:44 -06:00
Scott Schafer
82eed00d39
chore(compiletest): Use newest anstyle-svg version 2025-09-19 12:28:44 -06:00
Jakub Beránek
4b755141bc
Simplify default value of download-ci-llvm 2025-09-19 20:12:30 +02:00
Marijn Schouten
e2de670558 btree: safety comments for init and new 2025-09-19 17:21:55 +00:00
Mateusz Mikuła
7eea65f8e0 Stop linking rs{begin,end} on x86_64-*-windows-gnu
Until now, x86_64-pc-windows-gnu linked `rsbegin.o` and `rsend.o` just
like i686-pc-windows-gnu, even though they were no-ops for it.
This was likely done for the simplicity back when it was introduced.

Today the things are different and these startup/end objects harm other
features, like `build-std`. Given the demotion of i686-pc-windows-gnu
from tier 1, there is no point in hurting x86_64-pc-windows-gnu,
which remains a tier 1.

The files are still shipped in case downstream crates expect them, as in
case of the unmaintained `xargo`.
2025-09-19 19:06:15 +02:00
bors
59043567a5 Auto merge of #146765 - Zalathar:rollup-ewh4s9o, r=Zalathar
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#146229 (Automatically switch to lto-fat when flag RUSTFLAGS="- Zautodiff=Enable" is set)
 - rust-lang/rust#146484 (rustdoc-search: JavaScript optimization based on Firefox Profiler output)
 - rust-lang/rust#146541 (std: simplify host lookup)
 - rust-lang/rust#146615 (rustc_codegen_llvm: Feature Conversion Tidying)
 - rust-lang/rust#146638 (`rustc_next_trait_solver`: canonical out of `EvalCtxt`)
 - rust-lang/rust#146663 (Allow windows resource compiler to be overridden)
 - rust-lang/rust#146691 (std: Fix WASI implementation of `remove_dir_all`)
 - rust-lang/rust#146709 (stdarch subtree update)
 - rust-lang/rust#146738 (Fix tidy spellchecking on Windows)
 - rust-lang/rust#146740 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-19 15:22:22 +00:00
Josh Triplett
3ab89abac4 mbe: Fix feature gate for macro_derive 2025-09-19 23:17:12 +08:00
Chayim Refael Friedman
300aee8239
Merge pull request #20701 from A4-Tacks/track-caller-assist-test
Add `#[track_caller]` for check_assist_by_label
2025-09-19 15:07:17 +00:00
Ralf Jung
04f6b8f992 fix ./x readdir logic when CDPATH is set 2025-09-19 16:48:05 +02:00
Marijn Schouten
e500dd820b fixes for numerous clippy warnings 2025-09-19 14:46:12 +00:00
Marijn Schouten
4320de6424 fixes for numerous clippy warnings 2025-09-19 14:22:26 +00:00
Jakub Beránek
58814bce6c
Allow running x <cmd> <path> from a different directory 2025-09-19 16:21:34 +02:00
Shoyu Vanilla (Flint)
6ec196a748
Merge pull request #20697 from Oblarg/fix-negative-const-generic-literals
fix negative const generic integer literals
2025-09-19 14:13:54 +00:00
Oblarg
9ba9869b33 address review feedback 2025-09-19 10:03:14 -04:00
Laurențiu Nicola
b1d9569443
Merge pull request #20703 from ShoyuVanilla/remove-chalk-solve
minor: Get rid of unused deps `chalk-solve` and `chalk-recursive`
2025-09-19 13:47:35 +00:00
Shoyu Vanilla
bf5fe6e44c minor: Get rid of unused deps chalk-solve and chalk-recursive 2025-09-19 22:35:46 +09:00
Stuart Cook
5d404e05bc
Rollup merge of #146740 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to 5a142000d2.

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

r? ``@ghost``
2025-09-19 22:31:55 +10:00
Stuart Cook
a2c7008e15
Rollup merge of #146738 - beepster4096:widnows, r=jieyouxu
Fix tidy spellchecking on Windows

Tidy should now check for executable with the right extension for the platform when installing tools
2025-09-19 22:31:55 +10:00
Stuart Cook
e09cc55d2e
Rollup merge of #146709 - a4lg:stdarch-sync-20250917, r=Kobzol
stdarch subtree update

Subtree update of `stdarch` to [rust-lang/stdarch@9f12c1a](9f12c1af60).

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

r? ```@Kobzol```
2025-09-19 22:31:54 +10:00
Stuart Cook
20b6f7596b
Rollup merge of #146691 - alexcrichton:wasip1-remove-dir-all-buffer, r=juntyr
std: Fix WASI implementation of `remove_dir_all`

This commit is a change to the WASI-specific implementation of the `std::fs::remove_dir_all` function. Specifically it changes how directory entries are read of a directory-being-deleted to specifically buffer them all into a `Vec` before actually proceeding to delete anything. This is necessary to fix an interaction with how the WASIp1 `fd_readdir` API works to have everything work out in the face of mutations while reading a directory.

The basic problem is that `fd_readdir`, the WASIp1 API for reading directories, is not a stateful read of a directory but instead a "seekable" read of a directory. Its `cookie` argument enables seeking anywhere within the directory at any time to read further entries. Native host implementations do not have this ability, however, which means that this seeking property must be achieved by re-reading the directory. The problem with this is that WASIp1 has under-specified semantics around what should happen if a directory is mutated between two calls to `fd_readdir`. In essence there's not really any possible implementation in hosts except to read the entire directory and support seeking through the already-read list. This implementation is not possible in the WASIp1-to-WASIp2 adapter that is primarily used to create components for the `wasm32-wasip2` target where it has constrained memory requirements and can't buffer up arbitrarily sized directories. There's some more detailed discussion at https://github.com/bytecodealliance/wasmtime/issues/11701#issuecomment-3299957213 as well.

The WASIp1 API definitions are effectively "dead" now at the standards level meaning that `fd_readdir` won't be changing nor will a replacement be coming. For the `wasm32-wasip2` target this will get fixed once filesystem APIs are updated to use WASIp2 directly instead of WASIp1, making this buffering unnecessary. In essence while this is a hack it's sort of the least invasive thing that works everywhere for now. I don't think this is viable to fix in hosts so guests compiled to wasm are going to have to work around it by not relying on any guarantees about what happens to a directory if it's mutated between reads.
2025-09-19 22:31:53 +10:00
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