304366 Commits

Author SHA1 Message Date
Nicholas Nethercote
c54db96b8b Remove toml-0.5.11 dependency.
We also depend on `toml-0.7.8` and `toml-0.8.23`, but this one is easy
to get rid of.
2025-08-22 08:04:55 +10:00
Nicholas Nethercote
df3d79793b Remove dirs-sys-0.4.1 dependency.
By updating rustfmt to use `dirs-6.0.0`.
2025-08-22 08:04:49 +10:00
Jacob Pratt
7d2993daf3
Rollup merge of #145712 - notJoon:fix/outdate-link, r=lqd
Update outdated link in bound region comments

While reading the implementation code for bound regions, I found that a link in the comments was outdated. I've updated it with a link to the corresponding documentation in the rustc dev guide that covers the same content.

prev link: https://rustc-dev-guide.rust-lang.org/early-late-bound-params/early-late-bound-summary.html (404 error)
updated: https://rustc-dev-guide.rust-lang.org/early_late_parameters.html
2025-08-21 17:57:58 -04:00
Jacob Pratt
03fbcdb8ee
Rollup merge of #145705 - folkertdev:prefetch-remove-as-cast, r=RalfJung
remove an `as` cast in prefetch codegen

r? `@RalfJung`
2025-08-21 17:57:58 -04:00
Jacob Pratt
0fcf80c055
Rollup merge of #145704 - marcoieni:no-windows-disk-cleanup, r=jieyouxu
ci: don't cleanup windows disk
2025-08-21 17:57:57 -04:00
Jacob Pratt
01f353af05
Rollup merge of #145703 - Gelbpunkt:ci-llvm-mips, r=Kobzol
Remove MIPS targets from CI LLVM platforms

All of these were demoted to tier 3 a while ago and we aren't building LLVM for them anymore.
2025-08-21 17:57:57 -04:00
Jacob Pratt
cc98a849c8
Rollup merge of #145700 - nnethercote:fix-145696, r=lcnr
Handle `ReEarlyParam` in `type_name`.

Fixes rust-lang/rust#145696.

r? `@lcnr`
2025-08-21 17:57:56 -04:00
Jacob Pratt
e4d71b8089
Rollup merge of #145689 - cuviper:panic_unwind-cfg, r=joshtriplett
Migrate `panic_unwind` to use `cfg_select!`

This follows rust-lang/rust#145489 with an additional place we can drop the `cfg-if` dependency.
2025-08-21 17:57:55 -04:00
Jacob Pratt
268ef7bafe
Rollup merge of #145672 - compiler-errors:query-instab-ice, r=lcnr
Instantiate higher-ranked binder with erased when checking `IntoIterator` predicate for query instability

Fixes https://github.com/rust-lang/rust/issues/145652 which was introduced by https://github.com/rust-lang/rust/pull/139345 because we were skipping a binder before calling `Instance::try_resolve`.

r? lcnr
2025-08-21 17:57:55 -04:00
Jacob Pratt
b426cb2af8
Rollup merge of #145661 - folkertdev:s390x-codegen-test-cleanup, r=dianqk
update some s390x codegen tests

By using `minicore`, `&raw` and removing use of `link_llvm_intrinsics`
2025-08-21 17:57:54 -04:00
Jacob Pratt
5619a465ac
Rollup merge of #145648 - bjorn3:tidy_deps_stricter, r=davidtwco
Add two tidy dependency checks

Deny duplicate dependencies for the standard library as it would almost certainly bloat executables. And deny proc-macro dependencies for the standard library as they would break cross-compilation.
2025-08-21 17:57:53 -04:00
Jacob Pratt
f49d69093e
Rollup merge of #145604 - compiler-errors:static-closure, r=fmease
Gate static closures behind a parser feature

I'd like to gate `static ||` closures behind a feature gate, since we shouldn't allow people to take advantage of this syntax if it's currently unstable. Right now, since it's only rejected after ast lowering, it's accessible to macros.

Let's crater this to see if we can claw it back without breaking anyone's code.
2025-08-21 17:57:52 -04:00
Jacob Pratt
54da0402ad
Rollup merge of #145507 - jdonszelmann:refactor-attr-parsing, r=davidtwco
Refactor attribute parsing to improve ergonomics and some diagnostics
2025-08-21 17:57:52 -04:00
Jacob Pratt
02deabb779
Rollup merge of #145137 - Kmeakin:km/optimize-slice-index-panicking, r=jhpratt
Consolidate panicking functions in `slice/index.rs`

Consolidate all the panicking functions in `slice/index.rs` to use a single `slice_index_fail` function, similar to how it is done in `str/traits.rs`.

Split off from https://github.com/rust-lang/rust/pull/145024
2025-08-21 17:57:51 -04:00
Jacob Pratt
cd0972f6f5
Rollup merge of #144780 - bjorn3:mir_build_debug, r=matthewjasper
Add a method to dump MIR in the middle of MIR building

This makes it easier to debug issues with MIR building by inserting dump_for_debugging calls around the suspected code responsible for the bad MIR.
2025-08-21 17:57:50 -04:00
Jacob Pratt
057fee915c
Rollup merge of #144613 - pantsman0:nintendo_switch_cpu_features, r=wesleywiser
aarch64-nintendo-switch-freestanding - Enable CPU features that are always available in a live system (crypto instructions, plus explicit NEON).

~~While some NEON and crypto features may not be supported on the Nintendo Switch at boot (e.g. on the a53 cores) and this has not been tested, the features will _always_ be available if running as a sysmodule or homebrew application under Horizon/Atmosphere.~~ EDIT:  the a53 cores are fused out, these features are always available.

This has been tested with local tools personally, as well as building [emuiibo](https://github.com/XorTroll/emuiibo) as it uses both `sha` and `aes` primitives. This was tested using inline assembly in previous versions, and in current versions by using the `aes`, `ctr`, `hmac`, and `sha2` crates.

r? `@jam1garner`

This ended up being much delayed from our discussions about updating this. I tested a number of individual features such as the `aes` and `sha2` target-features directly to avoid a warning message with the `crypto` feature, but that appears to be caused by https://github.com/rust-lang/rust/issues/96472 and is not actually an issue.

There is also a decision to make here about explicitly enabling the `neon` feature. I am in favor of it to be explicit, but it is not necessary as it is already enabled by the `v8a` and `crypto` features. I will defer to your decision as it does not change the actual instructions available for codegen.
2025-08-21 17:57:49 -04:00
Jacob Pratt
32975fe542
Rollup merge of #144541 - folkertdev:c-variadic-same-program-multiple-abis-arm, r=RalfJung,davidtwco
c-variadic: multiple ABIs in the same program for arm

similar to https://github.com/rust-lang/rust/pull/144379, but for arm, requested in https://github.com/rust-lang/rust/pull/144066.

Quoting https://github.com/rust-lang/reference/issues/1946#issuecomment-3124555690

> `"aapcs"` specifically refers to the soft-float ABI where floating-point values are passed in integer registers.

However for c-variadic functions, `aapcs` behaves the same as `C`:

https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#65parameter-passing

> A variadic function is always marshaled as for the base standard.

https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#7the-standard-variants

> This section applies only to non-variadic functions. For a variadic function the base standard is always used both for argument passing and result return.

---

I also noticed that rustc currently emit more instructions than clang for c-variadic functions on arm, see https://godbolt.org/z/hMce9rnTh. I'll fix that separately. (edit: https://github.com/rust-lang/rust/pull/144549)

try-job: armhf-gnu
r? `@RalfJung`
2025-08-21 17:57:49 -04:00
Jacob Pratt
0a0553e2e4
Rollup merge of #137494 - nabijaczleweli:dup, r=Mark-Simulacrum
libstd: init(): dup() subsequent /dev/nulls instead of opening them again

This will be faster, and also it deduplicates the code so win/win

The dup() is actually infallible here. But whatever.

Before:
```
poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 1 ([{fd=2, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 2
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f5749313050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 2 ([{fd=0, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 0
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 2
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7efe12006050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 3 ([{fd=0, revents=POLLNVAL}, {fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 0
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 1
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 2
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fc2dc7ca050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
```

After:
```
poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 1 ([{fd=1, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 1
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f488a3fb050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 2 ([{fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 1
dup(1)                                  = 2
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f1a8943c050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 3 ([{fd=0, revents=POLLNVAL}, {fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}])
openat(AT_FDCWD, "/dev/null", O_RDWR)   = 0
dup(0)                                  = 1
dup(0)                                  = 2
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4e3a4c7050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
```
2025-08-21 17:57:48 -04:00
Aapo Alasuutari
fd44708aa3 Add reborrow feature gate test 2025-08-22 00:15:59 +03:00
Aapo Alasuutari
5af359162e Introduce Reborrow lang item and trait 2025-08-21 23:53:25 +03:00
binarycat
ead9f58251 make primitive:pointer work in type-based search. 2025-08-21 15:48:29 -05:00
Aapo Alasuutari
719880dd2a Introduce reborrow unstable feature 2025-08-21 23:38:20 +03:00
binarycat
d022089f58 rustdoc::invalid_html_tags(unclosed comment): fix off by one in span 2025-08-21 15:00:01 -05:00
binarycat
15a8999aed refactor rustdoc::invalid_html_tags tag parser
previously, this lint did not distinguish between `<img` and `<img>`,
and since the latter should be accepted under html5,
the former was also accepted.

the parser now also handles multi-line tags and multi-line attributes.
2025-08-21 15:00:01 -05:00
binarycat
e50fed79a8 add regression test for #145529 2025-08-21 15:00:00 -05:00
Michael Howell
53b775d9c6 rustdoc-search: GUI tests check for // in URL
When this fails, you get output that looks like:

    /home/user/rust/tests/rustdoc-gui/search-result-impl-disambiguation.goml search-result-impl-disambiguation... FAILED
    [ERROR] `tests/rustdoc-gui/utils.goml` around line 49
        from `tests/rustdoc-gui/search-result-impl-disambiguation.goml` line 25: JS errors occurred: Event: Event

Making the error message more informative requires patching browser-ui-test.
2025-08-21 09:24:54 -07:00
Samuel Tardieu
cca6576a79
Add myself back to reviewer rotation (#15523)
changelog: none
r? ghost
2025-08-21 15:31:22 +00:00
Samuel Tardieu
5cdabadea1
Add myself back to reviewer rotation 2025-08-21 17:25:51 +02:00
Alex Macleod
c18363c0e3
too_many_lines: only highlight the function signature (#15461)
resolves https://github.com/rust-lang/rust-clippy/issues/15430

changelog: [`too_many_lines`]: only highlight the function signature
2025-08-21 15:25:03 +00:00
Alex Macleod
c32c864ec1
Lint to stable/beta lint docs page in diagnostics (#14547)
Fixes https://github.com/rust-lang/rust-clippy/issues/14534

r? @flip1995

changelog: none
2025-08-21 15:22:19 +00:00
Alex Macleod
1954d4c0e4
len_zero: clean-up a bit (#15518)
changelog: none
2025-08-21 15:22:11 +00:00
Alex Macleod
e2a8b5b036 Lint to stable/beta lint docs page in diagnostics 2025-08-21 15:16:28 +00:00
Timo
0039c64e4b
ptr_arg: clean-up a bit (#15507)
changelog: none
2025-08-21 14:59:12 +00:00
lcnr
e8ae1dab12 next-solver fix const_trait_impl bootstrap 2025-08-21 15:49:02 +02:00
Alex Macleod
743405d7bf
Do not replace match by if if any arm contains a binding (#15352)
changelog: [`match_bool`]: do not replace `match` by `if` if any arm
contains a binding

Fixes rust-lang/rust-clippy#15351
2025-08-21 13:42:44 +00:00
Lee ByeongJun
9bcaa93584 update early and late bound docs link 2025-08-21 22:17:21 +09:00
lumiscosity
70e7c058a0 Losslessly optimize PNG files
Losslessly optimizes all of the PNG files in the repo. Done with:

```
oxipng -o max -a -s
oxipng -o max --zopfli -a -s
```
2025-08-21 14:14:30 +02:00
WANG Rui
d07009cb89 Fix the ABI parameter inconsistency issue in debug.rs for LoongArch64 2025-08-21 20:04:02 +08:00
Jana Dönszelmann
becefdda36
split up context.rs 2025-08-21 13:15:30 +02:00
Jana Dönszelmann
9da854115f
Introduce a prelude for very common imports across dozens of files 2025-08-21 13:15:30 +02:00
Jana Dönszelmann
2158e2d4d7
refactor target checking, move out of context.rs and rename MaybeWarn to Policy 2025-08-21 13:15:30 +02:00
Jana Dönszelmann
9be8effb3f
impl IntoDiagArg for AttrPath 2025-08-21 13:15:30 +02:00
bors
6ba0ce4094 Auto merge of #145647 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to 980da679e4.

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

r? `@ghost`
2025-08-21 10:10:42 +00:00
Karl Meakin
377a0c88a9 Consolidate panicking functions in slice/index.rs
Consolidate all the panicking functions in `slice/index.rs` to use a single
`slice_index_fail` function, similar to how it is done in `str/traits.rs`.
2025-08-21 11:07:25 +01:00
Folkert de Vries
b32f4d5792
remove an as cast in prefetch codegen 2025-08-21 11:28:10 +02:00
MarcoIeni
e073f905fb
ci: don't cleanup windows disk 2025-08-21 10:56:48 +02:00
Timo
763420c9e1
extract duplicate_underscore_argument, and move it into functions (#15508)
Basically continuing the work in
https://github.com/rust-lang/rust-clippy/issues/6680

Honestly I think the lint could also be run on (trait) impl items, but I
didn't implement that because of the feature freeze. If that is deemed
okay to add in this PR though, I could happily do so.

changelog: none
2025-08-21 07:56:17 +00:00
Jens Reidel
a75aed356a
Remove MIPS targets from CI LLVM platforms
All of these were demoted to tier 3 a while ago and we aren't building
LLVM for them anymore.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-08-21 09:04:35 +02:00
bors
57e620e56b Auto merge of #145701 - jhpratt:rollup-a0kg33p, r=jhpratt
Rollup of 19 pull requests

Successful merges:

 - rust-lang/rust#143383 (stabilize `const_array_each_ref`)
 - rust-lang/rust#144758 ([Doc] Add links to the various collections)
 - rust-lang/rust#144915 (Defer tail call ret ty equality to check_tail_calls)
 - rust-lang/rust#145256 (Add new `--test-codegen-backend` bootstrap option)
 - rust-lang/rust#145297 (fix(debuginfo): handle false positives in overflow check)
 - rust-lang/rust#145390 (Shorten some dependency chains in the compiler)
 - rust-lang/rust#145415 (std_detect: RISC-V: implement implication to "C")
 - rust-lang/rust#145525 (stdlib: Replace typedef -> type alias in doc comment)
 - rust-lang/rust#145590 (Prevent impossible combinations in `ast::ModKind`.)
 - rust-lang/rust#145593 (UnsafePinned::raw_get: sync signature with get)
 - rust-lang/rust#145621 (Fix some doc typos)
 - rust-lang/rust#145627 (Unconditionally-const supertraits are considered not dyn compatible)
 - rust-lang/rust#145642 (Do not use effective_visibilities query for Adt types of a local trait while proving a where-clause)
 - rust-lang/rust#145650 (Fix JS search scripts path)
 - rust-lang/rust#145654 (Download CI GCC into the correct directory)
 - rust-lang/rust#145662 (Enforce correct number of arguments for `"x86-interrupt"` functions)
 - rust-lang/rust#145673 (Add flock support for cygwin)
 - rust-lang/rust#145674 (Enable triagebot `[review-changes-since]` feature)
 - rust-lang/rust#145678 (Fix typo in docstring)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-21 07:03:07 +00:00
Jacob Pratt
49eb7810e2
Rollup merge of #145678 - ttajakka:master, r=estebank
Fix typo in docstring

The return type is correct in the source code but incorrect in the docstring.
2025-08-21 01:12:25 -04:00