Commit Graph

300570 Commits

Author SHA1 Message Date
Oli Scherer
362d4ddff4 Don't look at static items' HIR for wfcheck 2025-06-30 08:45:43 +00:00
Folkert de Vries
e86fddc6d3 fix bitcast of single-element SIMD vectors 2025-06-30 10:38:35 +02:00
Oli Scherer
9b5d57d0a9 Unconditionally run check_item_type on all items 2025-06-30 08:06:08 +00:00
Oli Scherer
d0bb9a73aa Try increasing the repetition limit 2025-06-30 08:04:40 +00:00
Oli Scherer
bd3205c02b Require either wrapping nullary intrinsincs in const blocks or explicitly deciding not to 2025-06-30 08:04:40 +00:00
Oli Scherer
d37a04d09d Remove the nullary intrinsic const eval logic and treat them like other intrinsics 2025-06-30 08:04:40 +00:00
Oli Scherer
f1d6f48e91 Stop backends from needing to support nullary intrinsics 2025-06-30 08:04:19 +00:00
Oli Scherer
672e0bec9e Stop backends from needing to support nullary intrinsics 2025-06-30 08:04:19 +00:00
Oli Scherer
cca072ca15 Make check_param_wf only go through the HIR in the error path 2025-06-30 08:04:11 +00:00
Oli Scherer
215009bd0c Stop storing Span that is only used for checking for global bounds that do not hold 2025-06-30 08:04:11 +00:00
Kivooeo
c240566561 cleaned up some tests 2025-06-30 12:45:47 +05:00
Jieyou Xu
e664e7e116 Move RUST_TEST_NOCAPTURE warning to early config check 2025-06-30 15:17:28 +08:00
Jieyou Xu
f03074da23 Move compiletest main.rs to src/bin/
To make it obvious `compiletest`-the-tool has two components:

1. The core compiletest library, and
2. The tool binary, which will be executed by bootstrap.
2025-06-30 15:17:12 +08:00
Jieyou Xu
c8cef5bfaa Move some early config checks to the compiletest lib 2025-06-30 15:03:17 +08:00
nora
67e53f2a41 Merge pull request #2485 from dianne/update-cond-loop-desugaring
update AST-to-HIR lowering examples for conditionals and loops
2025-06-30 08:53:36 +02:00
Kivooeo
bf5910d9bb cleaned up some tests 2025-06-30 11:50:19 +05:00
Ralf Jung
8bb5f8cae4 Merge pull request #4429 from RalfJung/futex-val-too-big
linux futex: fix for val > i32::MAX
2025-06-30 06:48:18 +00:00
Nicholas Nethercote
c3c995a275 Handle build scripts better in -Zmacro-stats output.
Currently all build scripts are listed as `build_script_build` in the
stats header. This commit uses `CARGO_PKG_NAME` to improve that.

I tried it on Bevy, it works well, giving output like this on the build
script:
```
MACRO EXPANSION STATS: serde build script
```
and this on the crate itself:
```
MACRO EXPANSION STATS: serde
```
2025-06-30 16:32:00 +10:00
Kivooeo
1e3a2b2d4a cleaned up some tests 2025-06-30 11:23:01 +05:00
Ralf Jung
cd971c6e1e linux futex: fix for val > i32::MAX 2025-06-30 08:22:51 +02:00
Kivooeo
580bc12844 cleaned up some tests 2025-06-30 11:16:18 +05:00
Lukas Wirth
863d0b5d53 Merge pull request #20124 from zachs18/patch-1
Remove last use of `rustc_pattern_analysis::Captures`
2025-06-30 05:32:04 +00:00
dianne
390d1be1c7 update AST-to-HIR lowering examples for conditionals and loops
- `for` loops now use two `match`es for all of their bindings. I'm not
sure this is the most helpful way of conveying that, but it's about as
informative as before while staying brief.

- `while let` and `if let` don't use `match`; they use `let` expressions
in their conditions. Since `if let` no longer has significantly
different desugaring and having a whole bullet point for `while` would
feel redundant with `for`, I've removed those examples.
2025-06-29 21:25:53 -07:00
Tshepang Mbambo
787a4cc90f build-fail directive: make explanation more uniform
The last part of the paragraph did not fit
2025-06-30 06:15:08 +02:00
zachs18
bc06bb193d Remove last use of rustc_pat_analysis::Captures
It's not necessary anymore due to Rust 2024 lifetime capture rules.
2025-06-29 22:36:53 -05:00
Nicholas Nethercote
e0761a57ab Improve macro-stats printing.
By allowing long names to overlap with the "Uses" field when it has
spare space. This avoids unnecessary line breaks in the output.
2025-06-30 13:33:51 +10:00
Nicholas Nethercote
25a6fd3213 Augment the macro-stats test.
With a long macro name that could fit on one line, but currently isn't
formatted that way, because the name would overlap with the maximum
width of the "Uses" column. (The next commit will fix this.)
2025-06-30 12:53:00 +10:00
bors
f19142044f Auto merge of #142941 - compiler-errors:shallow-bail, r=lcnr
Shallowly bail from `coerce_unsized` more

We do a *lot* of coercion in HIR typeck. Most of the time we're just coercing a type to itself, but we always try `coerce_unsized` even if it's not necessary.

Let's avoid doing that by adding a fast path to `coerce_unsized`; see the comment in that function.
2025-06-30 02:02:46 +00:00
antoyo
15d23bd30b Merge pull request #723 from rust-lang/sync_from_rust_2025_06_28
Sync from rust 2025/06/28
2025-06-29 20:08:46 -04:00
zachs18
d98aaf7f80 Show auto trait and blanket impls for !
Add an empty `impl ! {}` so `rustdoc` generates auto trait impls and blanket impls on `!`'s documentation page.
2025-06-29 18:38:46 -05:00
Antoni Boucher
4347a9273f Fix handling of __builtin_ia32_rdtscp 2025-06-29 19:29:49 -04:00
FractalFir
c57393e2ea Regenerated intrinsics 2025-06-30 00:24:43 +02:00
FractalFir
88db5895ed Changed intrinsic generation to include full intrinsic names in panic messages 2025-06-30 00:24:28 +02:00
Samuel Tardieu
b57bf6b64d Fix cast_possible_truncation should not suggest inside const context (#15164)
Closes rust-lang/rust-clippy#15163

This lint should not give suggestions in const context for now, since a
lot of the commonly used method of `Result` is not const.

changelog: [`cast_possible_truncation`] fix improperly give suggestions
inside const context
2025-06-29 21:53:52 +00:00
Ralf Jung
555553f0b8 Merge pull request #4397 from tgross35/gettid-shims
Add shims for `gettid`-esque functions
2025-06-29 21:20:51 +00:00
Ralf Jung
d1ee0ebbf0 Merge pull request #4422 from RalfJung/more-ci
run CI on a bunch more architectures
2025-06-29 21:05:18 +00:00
Trevor Gross
d69b8e2b48 Add shims for gettid-esque functions
Various platforms provide a function to return the current OS thread ID,
but they all use a slightly different name. Add shims for these
functions for Apple, FreeBSD, and Windows, with tests to account for
those and a few more platforms that are not yet supported by Miri. The
syscall and extern symbol is included as well on Linux.

These should be useful in general but will also help support printing
the OS thread ID in panic messages [1].

[1]: https://github.com/rust-lang/rust/pull/115746

Squashed commit from Ralf:

    try_from_scalar: extend comment
2025-06-29 15:53:58 -05:00
Ralf Jung
ec85b70545 add a riscv64 test job 2025-06-29 22:40:18 +02:00
Ralf Jung
d5590734c9 remove duplicate clippy check 2025-06-29 22:40:16 +02:00
Ralf Jung
e788b3c79e also test on s390x via qemu 2025-06-29 22:40:15 +02:00
Ralf Jung
6aaaff8863 test on x86-32 and arm-32 2025-06-29 22:40:14 +02:00
Ralf Jung
ab2443cbad fix type mismatches in native-lib/scalar_arguments test 2025-06-29 22:40:12 +02:00
Ralf Jung
67ab61e8ba add float_nan test for powf
plus various minor tweaks
2025-06-29 22:32:31 +02:00
LorrensP-2158466
60a48287d7 make some powf and powi cases involving SNaN non-deterministic 2025-06-29 22:25:41 +02:00
Ralf Jung
33f1700cfc Merge pull request #4425 from RalfJung/rustup
Rustup
2025-06-29 20:06:55 +00:00
Ralf Jung
9c22372971 Merge from rustc 2025-06-29 21:30:10 +02:00
Ralf Jung
d539e66d90 Preparing for merge from rustc 2025-06-29 21:29:57 +02:00
bors
35f6036521 Auto merge of #142802 - compiler-errors:dedup-analyses, r=lcnr
Collapse Analysis|Borrowck|PostBorrowckAnalysis when there are no opaques

r? lcnr
2025-06-29 19:12:29 +00:00
Kivooeo
4feb5de34c moved tests 2025-06-30 00:03:28 +05:00
Antoni Boucher
67d8469c26 Add support for a few missing LLVM intrinsics 2025-06-29 14:22:00 -04:00