Commit Graph

303456 Commits

Author SHA1 Message Date
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
0920486fa6 Do not autofix comments containing bare CR 2025-06-30 00:02:17 +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
Kivooeo
4b6c3d923f moved & deleted some tests 2025-06-29 22:47:01 +05:00
yanglsh
9cba70b283 fix: cast_possible_truncation should not suggest inside const context 2025-06-30 01:33:35 +08:00
Samuel Tardieu
1f76a23d4d missing_panics_doc: Allow unwrap() and expect() inside const-only contexts (#15170)
changelog: [`missing_panics_doc`]: Allow unwrap() and expect()s in
const-only contexts

Fixes rust-lang/rust-clippy#15169.

As far as I can tell, this change keeps this lint in line with similar
issues and their fixes such as
https://github.com/rust-lang/rust-clippy/pull/13382 and
rust-lang/rust-clippy#10240, so I feel pretty confident that the
behavior it exhibits after this PR is correct.
2025-06-29 17:12:04 +00:00
itsjunetime
ff3c9c15b7 missing_panics_doc: Correctly distinguish maybe-const vs always-const contexts for missing_panics_doc
changelog: [`missing_panics_doc`]: Allow unwrap() and expect()s in const-only contexts
2025-06-29 10:54:13 -06:00
bors
ed2d759783 Auto merge of #143137 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2025-06-29 16:04:05 +00:00
Folkert de Vries
bcf51051ed inherit #[align] from trait method prototypes 2025-06-29 17:22:45 +02:00
Chayim Refael Friedman
2a66a5b7d5 Merge pull request #20122 from chenyukang/yukang-fix-remove-parens
Remove unnecessary parens in closure
2025-06-29 15:14:31 +00:00
Antoni Boucher
769fb75119 Fix exactudiv and exactsdiv for gcc without 128-bit integers 2025-06-29 10:48:58 -04:00
Samuel Tardieu
ad7de948a8 Consider deref'ed argument as non-temporary
If there are more than one dereference (there is one corresponding
matched with a borrow in any case), consider that the argument might
point to a place expression, which is the safest choice.

Also, use an appropriate number of dereferences in suggestions involving
arguments using themselves multiple dereferences.
2025-06-29 16:36:50 +02:00
Jieyou Xu
20d69c6c26 Re-disable tests/run-make/short-ice on Windows MSVC again 2025-06-29 22:29:12 +08:00
Anne Stijns
54cec0cf5a Port #[link_section] to the new attribute parsing infrastructure 2025-06-29 16:23:46 +02:00
Kivooeo
a38c78c461 moved tests 2025-06-29 18:06:00 +05:00
bors
5e749eb66f Auto merge of #143183 - GuillaumeGomez:rollup-g60lr91, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#142078 (Add SIMD funnel shift and round-to-even intrinsics)
 - rust-lang/rust#142214 (`tests/ui`: A New Order [9/N])
 - rust-lang/rust#142417 (`tests/ui`: A New Order [12/N])
 - rust-lang/rust#143030 (Fix suggestion spans inside macros for the `unused_must_use` lint)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-06-29 13:02:15 +00:00
Yotam Ofek
6992739ab8 Lazy-ify some markdown rendering 2025-06-29 12:41:16 +00:00
Yotam Ofek
cdc1617cae Don't try to guess how much to pre-allocate
Removing this heuristic doesn't show up as a regression in perf run
2025-06-29 12:41:01 +00:00
dianqk
24e553e6bc mir: Use the new method for BasicBlockData 2025-06-29 20:39:13 +08:00
Ralf Jung
651d2f8f23 Merge pull request #4424 from RalfJung/aarch64-linux-ci
also test on arm-64 linux hosts
2025-06-29 12:31:57 +00:00
dianqk
9f9cd5e283 mir: Add a new method to statement
Avoid introducing a large number of changes when adding optional initialization fields.
2025-06-29 20:13:36 +08:00
Ralf Jung
ea690818bd also test on arm-64 linux hosts 2025-06-29 13:38:55 +02:00