301225 Commits

Author SHA1 Message Date
Nadrieril
e9fb744207 Add test 2025-07-20 14:49:43 +02:00
Guillaume Gomez
4a35a9f074 Add new needs-backends tests annotations 2025-07-20 14:44:01 +02:00
Guillaume Gomez
9944139f70 Add new ignore-backends tests annotations 2025-07-20 14:43:59 +02:00
Laurențiu Nicola
fa0320d077
Merge pull request #20255 from A4-Tacks/deref-intranstive
Fix ide-assist: generate Deref transitive
2025-07-20 10:54:35 +00:00
Laurențiu Nicola
2eaba02b39
Merge pull request #20265 from ChayimFriedman2/cfg-select
feat: Support `cfg_select!`
2025-07-20 10:48:40 +00:00
Timo
c8e333c8c0
Fixed issue #15192 (#15241)
Fixes rust-lang/rust-clippy#15192 by adding checks for no_std while
giving out Box recommendation

```
changelog: [`large_enum_variant`]: Dont suggest `Box` in `no_std` mode
```
2025-07-20 10:37:58 +00:00
bors
ca9eecda36 Auto merge of #144208 - matthiaskrgr:rollup-wrli87h, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#141260 (Allow volatile access to non-Rust memory, including address 0)
 - rust-lang/rust#143604 (Stabilize `const_float_round_methods`)
 - rust-lang/rust#143988 ([rustdoc] Make aliases search support partial matching)
 - rust-lang/rust#144078 (Fix debuginfo-lto-alloc.rs test)
 - rust-lang/rust#144111 (Remove deprecated `MaybeUninit` slice methods)
 - rust-lang/rust#144116 (Fixes for LLVM 21)
 - rust-lang/rust#144134 (Cleanup unicode table gen)
 - rust-lang/rust#144142 (Add implicit sized bound to trait ascription types)
 - rust-lang/rust#144148 (Remove pretty print hack for async blocks)
 - rust-lang/rust#144169 (interpret: fix TypeId pointers being considered data pointers)
 - rust-lang/rust#144196 (Initialize mingw for the runner's user)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-20 10:06:53 +00:00
bjorn3
fdf8bdb7a2 Remove the ptr_unique lang item
Miri no longer uses it.
2025-07-20 09:50:58 +00:00
Chayim Refael Friedman
8b6559b05b Support cfg_select! 2025-07-20 11:56:45 +03:00
lakshay bhatia
b738d96325 Improve Help Message in large_enum_variant to satisfy #[no_std]
- Updated the `help:` text to include a more general suggestion
- Ensures compatibility with `#[no_std]` environments where boxing is
  still possible via `alloc`.
2025-07-20 13:51:45 +05:30
Matthias Krüger
faefaa0aef
Rollup merge of #144196 - ChrisDenton:init-mingw, r=mati865
Initialize mingw for the runner's user

This is apparently the more proper fix to https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Spurious.20bors.20CI.20failures/near/528915775

But let's see if it works.
2025-07-20 08:56:11 +02:00
Matthias Krüger
72588c8eb0
Rollup merge of #144169 - RalfJung:type-id-fix, r=oli-obk
interpret: fix TypeId pointers being considered data pointers

Fixes https://github.com/rust-lang/miri/issues/4477
r? ````@oli-obk````
2025-07-20 08:56:10 +02:00
Matthias Krüger
82c48e1c69
Rollup merge of #144148 - compiler-errors:async-print-hack, r=lqd
Remove pretty print hack for async blocks

I introduced this hack 3 years ago, but it's not needed anymore, probably due to https://github.com/rust-lang/rust/pull/104321.
2025-07-20 08:56:10 +02:00
Matthias Krüger
23c81a75e1
Rollup merge of #144142 - compiler-errors:itib, r=fmease
Add implicit sized bound to trait ascription types

r? ```@fmease``` or reassign

Thanks for catching this :)

Fixes rust-lang/rust#144135
2025-07-20 08:56:09 +02:00
Matthias Krüger
9a927a2f03
Rollup merge of #144134 - hkBst:cleanup-unicode-table-gen, r=Mark-Simulacrum
Cleanup unicode table gen

Fixing clippy warnings and moving to edition 2024.
2025-07-20 08:56:09 +02:00
Matthias Krüger
d24684ef4f
Rollup merge of #144116 - nikic:llvm-21-fixes, r=dianqk
Fixes for LLVM 21

This fixes compatibility issues with LLVM 21 without performing the actual upgrade. Split out from https://github.com/rust-lang/rust/pull/143684.

This fixes three issues:
 * Updates the AMDGPU data layout for address space 8.
 * Makes emit-arity-indicator.rs a no_core test, so it doesn't fail on non-x86 hosts.
 * Explicitly sets the exception model for wasm, as this is no longer implied by `-wasm-enable-eh`.
2025-07-20 08:56:08 +02:00
Matthias Krüger
5e5ac49bbb
Rollup merge of #144111 - clarfonthey:maybe-uninit-deprecated, r=jhpratt
Remove deprecated `MaybeUninit` slice methods

These were left in to make migration a bit easier, although they should be removed now since they were never stable.
2025-07-20 08:56:08 +02:00
Matthias Krüger
bfcfde97c2
Rollup merge of #144078 - bjorn3:fix_test, r=compiler-errors
Fix debuginfo-lto-alloc.rs test

This should have used build-pass rather than check-pass.
2025-07-20 08:56:07 +02:00
Matthias Krüger
dda505850a
Rollup merge of #143988 - GuillaumeGomez:alias-inexact, r=lolbinarycat
[rustdoc] Make aliases search support partial matching

Fixes rust-lang/rust#140782.

To make this work, I moved aliases into the `searchIndex` like any other item. It links to the "original" item with a new `original` field. No so great part is that we need to have some fields like `bitIndex` to be set on the alias to make the description load to work but I consider it minor enough to be ok.

This PR voluntarily doesn't handle de-prioritization of aliases as ```@lolbinarycat``` wished to work on this so I'll leave them this part. 😉

cc ```@lolbinarycat```
2025-07-20 08:56:06 +02:00
Matthias Krüger
a8c2e540ec
Rollup merge of #143604 - nxsaken:const_float_round_methods, r=RalfJung
Stabilize `const_float_round_methods`

Closes rust-lang/rust#141555, waiting for FCP.
2025-07-20 08:56:06 +02:00
Matthias Krüger
6d7d366fd3
Rollup merge of #141260 - LuigiPiucco:volatile-null, r=RalfJung
Allow volatile access to non-Rust memory, including address 0

This PR relaxes the `ub_check` in the `read_volatile`/`write_volatile` pointer operations to allow passing null. This is needed to support processors which hard-code peripheral registers on address 0, like the AVR chip ATtiny1626. LLVM understands this as valid and handles it correctly, as tested in my [PR to add a note about it](6387c82255 (diff-81bbb96298c32fa901beb82ab3b97add27a410c01d577c1f8c01000ed2055826)) (rustc generates the same LLVM IR as expected there when this PR is applied, and consequently the same AVR assembly).

Follow-up and implementation of the discussions in:
- https://internals.rust-lang.org/t/pre-rfc-conditionally-supported-volatile-access-to-address-0/12881/7
- https://github.com/Rahix/avr-device/pull/185;
- [#t-lang > Adding the possibility of volatile access to address 0](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/Adding.20the.20possibility.20of.20volatile.20access.20to.20address.200/with/513303502)
- https://discourse.llvm.org/t/rfc-volatile-access-to-non-dereferenceable-memory-may-be-well-defined/86303

r? ````@RalfJung````

Also fixes https://github.com/rust-lang/unsafe-code-guidelines/issues/29 (about as good as it'll get, null will likely never be a "normal" address in Rust)
2025-07-20 08:56:05 +02:00
bors
81af9d4569 Auto merge of #144068 - dianqk:update-llvm, r=cuviper
Update LLVM submodule

Fixes for https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fllvm/topic/Backporting.20LLVM.20fix.20for.20Wasm.20EH.3F/near/528879210.
2025-07-20 06:45:43 +00:00
Ralf Jung
c9f96487ce
Merge pull request #4485 from rust-lang/rustup-2025-07-20
Automatic Rustup
2025-07-20 06:05:35 +00:00
yanglsh
1b883197d7 fix: if_then_some_else_none FP when require type coercion 2025-07-20 13:52:18 +08:00
The Miri Cronjob Bot
c3175802c5 Merge from rustc 2025-07-20 05:08:02 +00:00
The Miri Cronjob Bot
329fda0bc9 Preparing for merge from rustc 2025-07-20 05:00:42 +00:00
Scott McMurray
4b8f869c63 Split repeat-operand codegen test
Looks like the output it's looking for can be in different orders, so separate tests will fix that.
2025-07-19 20:50:02 -07:00
Scott McMurray
0586c63e07 Allow Rvalue::Repeat to return true in rvalue_creates_operand too
The conversation in 143502 made be realize how easy this is to handle, since the only possibilty is ZSTs -- everything else ends up with the destination being `LocalKind::Memory` and thus doesn't call `codegen_rvalue_operand` at all.

This gets us perilously close to a world where `rvalue_creates_operand` only ever returns true.  I'll try out such a world next :)
2025-07-19 20:50:02 -07:00
ltdk
56288857d8 Remove deprecated MaybeUninit slice methods 2025-07-19 22:33:15 -04:00
bors
6707bf0f59 Auto merge of #143002 - Enselic:tests-ui-run-fail-exit-vs-signal, r=petrochenkov
tests: Require `run-fail` ui tests to have an exit code (`SIGABRT` not ok)

And introduce two new directives for ui tests:
* `run-crash`
* `run-fail-or-crash`

Normally a `run-fail` ui test like tests that panic shall not be terminated by a signal like `SIGABRT`. So begin having that as a hard requirement.

Some of our current tests do terminate by a signal/crash however.  Introduce and use `run-crash` for those tests. Note that Windows crashes are not handled by signals but by certain high bits set on the process  exit code. Example exit code for crash on Windows: `0xc000001d` (`STATUS_ILLEGAL_INSTRUCTION`).  Because of this, we define "crash" on all platforms as "not exit with success and not exit with a regular failure code in the range 1..=127".

Some tests behave differently on different targets:
* Targets without unwind support will abort (crash) instead of exit with   failure code 101 after panicking. As a special case, allow crashes for   `run-fail` tests for such targets.
* Different sanitizer implementations handle detected memory problems   differently. Some abort (crash) the process while others exit with   failure code 1. Introduce and use `run-fail-or-crash` for such tests.

This adds further (cc https://github.com/rust-lang/rust/pull/142304, https://github.com/rust-lang/rust/pull/142886) protection against the regression in https://github.com/rust-lang/rust/issues/123733 since that bug also manifested as `SIGABRT` in `tests/ui/panics/panic-main.rs` (shown as `Aborted (core dumped)` in the logs attached to that issue, and I have also been able to reproduce this locally).

### TODO
- [x] **Q:** what about on Windows?
    **A:** we'll treat any exit code outside of 1 - 127 as "crashed", and we'll do the same on unix.
- [x] test all permutations of actual vs expected
    **Done:** See https://github.com/rust-lang/rust/pull/143002#issuecomment-3007502894.
- [x] Handle targets without unwind support
- [x] Add `run-fail-or-crash` for some sanitizer tests
- [x] remote-test-client. See https://github.com/rust-lang/rust/pull/143448

### Zulip discussion

See https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/compiletest.3A.20terminate.20by.20signal.20vs.20exit.20with.20error/with/525611235

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
try-job: test-various
try-job: armhf-gnu
2025-07-20 00:40:19 +00:00
github-actions
3e5cf9ab86 cargo update
compiler & tools dependencies:
     Locking 15 packages to latest compatible versions
    Updating chrono-tz v0.10.3 -> v0.10.4
    Removing chrono-tz-build v0.4.1
    Updating clap v4.5.40 -> v4.5.41
    Updating clap_builder v4.5.40 -> v4.5.41
    Updating clap_derive v4.5.40 -> v4.5.41
    Updating crc32fast v1.4.2 -> v1.5.0
    Updating derive_setters v0.1.7 -> v0.1.8
    Updating libredox v0.1.4 -> v0.1.6
    Updating measureme v12.0.1 -> v12.0.3
    Removing parse-zoneinfo v0.3.1
      Adding phf v0.12.1
      Adding phf_shared v0.12.1
    Updating rustix v1.0.7 -> v1.0.8
    Updating serde_json v1.0.140 -> v1.0.141
    Updating sysinfo v0.36.0 -> v0.36.1
    Updating wasi-preview1-component-adapter-provider v34.0.1 -> v34.0.2
    Updating winnow v0.7.11 -> v0.7.12
note: pass `--verbose` to see 39 unchanged dependencies behind latest

library dependencies:
     Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 3 unchanged dependencies behind latest

rustbook dependencies:
     Locking 13 packages to latest compatible versions
    Updating ammonia v4.1.0 -> v4.1.1
    Updating cc v1.2.29 -> v1.2.30
    Updating clap v4.5.40 -> v4.5.41
    Updating clap_builder v4.5.40 -> v4.5.41
    Updating clap_complete v4.5.54 -> v4.5.55
    Updating clap_derive v4.5.40 -> v4.5.41
    Updating crc32fast v1.4.2 -> v1.5.0
    Updating html5ever v0.31.0 -> v0.35.0
    Updating markup5ever v0.16.2 -> v0.35.0
    Updating match_token v0.1.0 -> v0.35.0
    Updating rustix v1.0.7 -> v1.0.8
    Updating serde_json v1.0.140 -> v1.0.141
    Updating winnow v0.7.11 -> v0.7.12
2025-07-20 00:27:45 +00:00
Alejandra González
56de455c7f
Fix capacity overflow in single_match with deref patterns (#15124)
Fixes rust-lang/rust-clippy#14882

changelog: [`single_match`]: fix ICE with deref patterns and string
literals
2025-07-20 00:24:24 +00:00
Alejandra González
6543a096bf
Fix never_loop forget to remove break in suggestion (#15064)
Closes rust-lang/rust-clippy#15007

Removes the `break` stmt and the dead code after it when appropriate.

changelog: [`never_loop`] Make sure to remove `break` in suggestions
2025-07-20 00:23:46 +00:00
Chayim Refael Friedman
a6c7ceaae3 Fix search of raw labels and lifetimes
It used to search for `'foo` which won't find `'r#foo`, now we search for `foo` instead.
2025-07-20 01:20:09 +03:00
Chris Denton
db1449aed5
Initialize mingw for the runner's user 2025-07-19 22:05:47 +00:00
Rémy Rakic
8f77d5463a add non-regression test for issue 144168 2025-07-19 21:43:50 +00:00
bors
ee3a0783df Auto merge of #144181 - jieyouxu:rollup-61j2sar, r=jieyouxu
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#143960 (Tidy cleanup 2)
 - rust-lang/rust#144149 (docs: update link to RISC-V and Xtensa installation guide)
 - rust-lang/rust#144152 (Rename `optional-mingw-check-1` to `optional-pr-check-1`)
 - rust-lang/rust#144178 (Fix clippy lints in librustdoc)
 - rust-lang/rust#144180 (fix load-bearing typo)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-19 21:38:23 +00:00
Scott McMurray
14d097f641 Give a message with a span on validation error 2025-07-19 14:14:12 -07:00
Guillaume Gomez
2f14d0a65d Add code comment explaining better what Row.name is for doc aliases 2025-07-19 22:29:13 +02:00
Nurzhan Sakén
caf4f111bc Add #[rustc_intrinsic_const_stable_indirect] to float rounding
intrinsics
2025-07-20 00:09:32 +04:00
Nurzhan Sakén
ca01e7de6f Stabilize const_float_round_methods 2025-07-20 00:08:58 +04:00
binarycat
c6d50eaa49 integrate build_helper::npm into js checks and package.json usage 2025-07-19 14:56:42 -05:00
binarycat
ca39010d3e update completions 2025-07-19 14:52:31 -05:00
binarycat
2ffa711ea5 REUSE.toml: add new package.json and package-lock.json 2025-07-19 14:44:16 -05:00
binarycat
c8e2a65ed1 tidy: use a lockfile for js tools instead of npx
this makes us less vulnerable to MITM and supply chain attacks.

it also means that the CI scripts are no longer responsible for
tracking the versions of these tools.

it should also avoid the situation where local tsc and CI
disagree on the presense of errors due to them being different versions.
2025-07-19 14:44:15 -05:00
binarycat
4bd3b74aa9 update CI to use new tidy extra checks for rustdoc js 2025-07-19 14:44:15 -05:00
binarycat
a2586f0c80 tidy: running of eslint, tsc, and es-check are now an extra check 2025-07-19 14:44:15 -05:00
Jakub Beránek
fc74c2272b Add approval blocking labels for new bors 2025-07-19 21:30:12 +02:00
Jakub Beránek
245d2c95b1 Implement check::Compiletest using the tool_check_step macro 2025-07-19 20:56:04 +02:00
Jakub Beránek
bb46b8cf6a Allow selecting check tool Mode based on Builder 2025-07-19 20:56:04 +02:00