Commit Graph

300570 Commits

Author SHA1 Message Date
Jubilee
fde4de4d2d Rollup merge of #143297 - Kivooeo:tf22, r=tgross35
`tests/ui`: A New Order [22/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? `@tgross35`
2025-07-04 23:26:22 -07:00
Jubilee
19a7f0fb7d Rollup merge of #143296 - Kivooeo:tf21, r=tgross35
`tests/ui`: A New Order [21/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? `@tgross35`
2025-07-04 23:26:21 -07:00
Jubilee
f10725218d Rollup merge of #143202 - Kivooeo:tf18, r=tgross35
`tests/ui`: A New Order [18/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? `@tgross35`
2025-07-04 23:26:21 -07:00
Jubilee
2f119daf4e Rollup merge of #143086 - SciMind2460:patch-2, r=workingjubilee
Update poison.rs to fix the typo (sys->sync)
2025-07-04 23:26:20 -07:00
Jubilee
3b522384e4 Rollup merge of #143040 - SciMind2460:patch-1, r=workingjubilee
Add `const Rem`
2025-07-04 23:26:20 -07:00
Jubilee
b1234daf8c Rollup merge of #142440 - Kivooeo:tf14, r=tgross35
`tests/ui`: A New Order [14/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? `@jieyouxu`
2025-07-04 23:26:19 -07:00
bit-aloo
8199c950e8 make mark_as_executed private 2025-07-05 11:32:21 +05:30
bit-aloo
0a57612e63 migrate render test to new bootstrap command streaming API's 2025-07-05 11:32:20 +05:30
bit-aloo
b891d9add1 migrate cargo streaming to new bootstrap command streaming API's 2025-07-05 11:32:13 +05:30
bit-aloo
3f3f12c341 add streaming command struct for (spawn + piping scenario) 2025-07-05 11:12:37 +05:30
Ayush Singh
1f01d9b3db std: sys: net: uefi: tcp4: Implement read
A blocking implementation of tcp4 read.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-07-05 11:10:38 +05:30
Trevor Gross
016bc61312 Test building custom targets and resolve an issue probing rustc
The `rustc` probe done in our build scripts needs to pass `--target` to
get the correct configuration, which usually comes from the `TARGET`
environment variable. However, for targets specified via a `target.json`
file, `TARGET` gets set to the file name without an extension or path.
`rustc` will check a search path to attempt to locate the file, but this
is likely to fail since the directory where Cargo invokes build scripts
(and hence where those scripts invoke `rustc`) might not have any
relation to the JSON spec file.

Resolve this for now by leaving `f16` and `f128` disabled if the `rustc`
command fails. Result of the discussion at CARGO-14208 may eventually
provide a better solution.

A CI test is also added since custom JSON files are an edge case that
could fail in other ways. I verified this fails without the fix here.
The JSON file is the output for `thumbv7em-none-eabi`, just renamed so
`rustc` doesn't identify it.
2025-07-04 21:09:56 -05:00
bors
733b47ea4b Auto merge of #138759 - scottmcm:operand-builder, r=saethlin
Allow `enum` and `union` literals to also create SSA values

Today, `Some(x)` always goes through an `alloca`, even in trivial cases where the niching means the constructor doesn't even change the value.

For example, <https://rust.godbolt.org/z/6KG6PqoYz>
```rust
pub fn demo(r: &i32) -> Option<&i32> {
    Some(r)
}
```
currently emits the IR
```llvm
define align 4 ptr `@demo(ptr` align 4 %r) unnamed_addr {
start:
  %_0 = alloca [8 x i8], align 8
  store ptr %r, ptr %_0, align 8
  %0 = load ptr, ptr %_0, align 8
  ret ptr %0
}
```
but with this PR it becomes just
```llvm
define align 4 ptr `@demo(ptr` align 4 %r) unnamed_addr {
start:
  ret ptr %r
}
```
(Of course the optimizer can clean that up, but it'd be nice if it didn't have to -- especially in debug where it doesn't run.  This is like rust-lang/rust#123886, but that only handled non-simd `struct`s -- this PR generalizes it to all non-simd ADTs.)

Doing this means handing variants other than `FIRST_VARIANT`, handling the active field for unions, refactoring the discriminant code so the Place and Operand parts can share the calculation, etc.

Other PRs that led up to this one:
- https://github.com/rust-lang/rust/pull/142005
- https://github.com/rust-lang/rust/pull/142103
- https://github.com/rust-lang/rust/pull/142324
- https://github.com/rust-lang/rust/pull/142383

---

try-job: aarch64-gnu
2025-07-05 01:37:08 +00:00
Jubilee Young
64bec0ffdb Fix tests/ui/abi/debug.rs to cross-compile for riscv64 2025-07-04 18:13:58 -07:00
YingkaiLi-VM
57d989b66a Fixed the ABI parameter inconsistency issue in debug.rs for the riscv64 architecture. 2025-07-04 17:32:33 -07:00
Trevor Gross
19ab6461fb Remove unused custom target JSON files
8521530f4938 ("Fix __divsi3 and __udivsi3 on thumbv6m targets") removed
tests that use these `thumb*-linux` target files in favor of tests that
use the `thumb*-none` targets, which are available via Rustup. The JSON
files haven't been used since then and are outdated, so remove them.
2025-07-04 19:30:31 -05:00
Kurt Heiritz (pseudo)
2d1aa58225 Make Rem const for floats 2025-07-04 16:40:45 -07:00
Trevor Gross
84060f608b symcheck: Improve diagnostics from spawned Cargo
Rather than printing the entire JSON dump, use the rendered version.
2025-07-04 18:18:31 -05:00
Kivooeo
7c2cc2ce40 cleaned up some tests 2025-07-05 03:46:08 +05:00
Trevor Gross
e164811f5d symcheck: Make target a positional argument
This makes it more obvious what we intend to check rather than looking
for `--target`.
2025-07-04 17:44:54 -05:00
bors
d98a5da813 Auto merge of #143459 - matthiaskrgr:rollup-gsv6uzl, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#141532 (std: sys: net: uefi: tcp4: Implement write)
 - rust-lang/rust#143085 (Port `#[non_exhaustive]` to the new attribute parsing infrastructure)
 - rust-lang/rust#143372 (Remove names_imported_by_glob_use query.)
 - rust-lang/rust#143386 (Assign dependency bump PRs to me)
 - rust-lang/rust#143406 (Remove some unnecessary `unsafe` in VecCache)
 - rust-lang/rust#143408 (mbe: Gracefully handle macro rules that end after `=>`)
 - rust-lang/rust#143414 (remove special-casing of boxes from match exhaustiveness/usefulness analysis)
 - rust-lang/rust#143444 (clean up GVN TypeId test)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-04 22:36:39 +00:00
Matthias Krüger
1ff6e44785 Rollup merge of #143444 - lukas-code:gvn-test, r=RalfJung
clean up GVN TypeId test

addresses https://github.com/rust-lang/rust/pull/142789#discussion_r2184897992

This is an attempt to clarify what this test is actually supposed to test and make it less dependent on `TypeId` internals (it now depends on the output of `type_name` instead).

I verified that this version still miscompiles on `nightly-2025-02-11`.

r? ``@oli-obk`` ``@RalfJung``
2025-07-05 00:12:12 +02:00
Matthias Krüger
e0dd7ecac1 Rollup merge of #143414 - dianne:box-usefulness-cleanup, r=Nadrieril
remove special-casing of boxes from match exhaustiveness/usefulness analysis

As a first step in replacing `box_patterns` with `deref_patterns`, this treats box patterns as deref patterns in the THIR and exhaustiveness analysis. This allows a bunch of special-casing to be removed. The emitted MIR is unchanged.

Incidentally, this fixes a bug caused by box patterns being treated like structs rather than pointers, where enabling `exhaustive_patterns` (rust-lang/rust#51085) could give rise to spurious `unreachable_patterns` lints on arms required for exhaustiveness. Following the lint's advice to remove the match arm would result in an error. I'm not sure what the current state of `exhaustive_patterns` is with regard to reference/box opsem, or whether there's any intention to have `unreachable_patterns` be more granular than the whole arm, but regardless this should hopefully make them easier to handle consistently.

Tracking issue for deref patterns: rust-lang/rust#87121

r? `@Nadrieril`
2025-07-05 00:12:12 +02:00
Matthias Krüger
2cde070b33 Rollup merge of #143408 - joshtriplett:fix-mbe-parser, r=compiler-errors
mbe: Gracefully handle macro rules that end after `=>`

Add a test for various cases of invalid macro definitions.

Closes: https://github.com/rust-lang/rust/issues/143351
2025-07-05 00:12:11 +02:00
Matthias Krüger
567c51d584 Rollup merge of #143406 - scottmcm:did-we-need-that-unsafe, r=compiler-errors
Remove some unnecessary `unsafe` in VecCache

I'm pretty sure, but until perf confirms,
r? ghost
2025-07-05 00:12:10 +02:00
Matthias Krüger
e2e72cd026 Rollup merge of #143386 - clubby789:dep-bump-me, r=compiler-errors
Assign dependency bump PRs to me

These PRs sometimes get lost as GH reduces their visibility, so I wanted to get an assignment so I can help these PRs land
2025-07-05 00:12:10 +02:00
Matthias Krüger
daf9adbd89 Rollup merge of #143372 - cjgillot:bare-glob-map, r=petrochenkov
Remove names_imported_by_glob_use query.

Based on https://github.com/rust-lang/rust/pull/143247
r? ``@ghost`` for perf
2025-07-05 00:12:09 +02:00
Matthias Krüger
031bf9715a Rollup merge of #143372 - cjgillot:bare-glob-map, r=petrochenkov
Remove names_imported_by_glob_use query.

Based on https://github.com/rust-lang/rust/pull/143247
r? ``@ghost`` for perf
2025-07-05 00:12:09 +02:00
Matthias Krüger
afe8ee34a7 Rollup merge of #143085 - JonathanBrouwer:non_exhaustive_parser, r=jdonszelmann
Port `#[non_exhaustive]` to the new attribute parsing infrastructure

Ports `non_exhaustive` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197

r? ``@jdonszelmann``
2025-07-05 00:12:09 +02:00
Matthias Krüger
edfaaeb397 Rollup merge of #141532 - Ayush1325:uefi-tcp4-send, r=tgross35
std: sys: net: uefi: tcp4: Implement write

A blocking implementation of tcp4 write.
2025-07-05 00:12:08 +02:00
Trevor Gross
6ae56f4e96 Remove the let_chains feature now that it is stable 2025-07-04 16:53:19 -05:00
Scott McMurray
d020e38fa2 Workaround a MemorySanitizer test issue 2025-07-04 14:47:28 -07:00
Kivooeo
066a281f60 cleaned up some tests 2025-07-05 01:54:04 +05:00
Kivooeo
62ada47328 cleaned up some tests 2025-07-05 01:25:48 +05:00
xizheyin
4a261a1513 Use relative visibility when noting sealed trait to reduce false positive
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-05 04:13:52 +08:00
Jakub Beránek
1a1f56174b Update completions 2025-07-04 22:10:02 +02:00
Jakub Beránek
46ce66ff5c Unify completion list between x test tidy and x run generate-completions 2025-07-04 22:10:02 +02:00
Kivooeo
0f7a86bb2a cleaned up some tests 2025-07-05 00:50:51 +05:00
Kivooeo
7f2e37fc5c moved & deleted tests
opeq.rs was removed as duplicating test logic in other tests
2025-07-05 00:48:10 +05:00
Kivooeo
b28806da23 cleaned up some tests 2025-07-05 00:45:24 +05:00
Kivooeo
9ad98f78d4 moved tests 2025-07-05 00:39:50 +05:00
Scott McMurray
4e615272bf Address PR feedback 2025-07-04 12:29:27 -07:00
Martin Nordholts
148a220e38 remote-test-client: Exit code 128 + <signal-number> instead of 3
If the remote process is terminated by a signal, make `remote-test-client` exit
with the code `128 + <signal-number>` instead of always `3`. This follows common
practice among tools such as bash [^1]:

> When a command terminates on a fatal signal whose number is N, Bash uses the
> value 128+N as the exit status.

It also allows us to differentiate between `run-pass` and `run-crash` ui tests
without special case code in compiletest for that when `remote-test-client` is
used.

[^1]: https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html
2025-07-04 20:44:26 +02:00
Jonathan Brouwer
9c9ee34807 Port #[non_exhaustive] to the new attribute parsing infrastructure 2025-07-04 20:30:42 +02:00
Jonathan Brouwer
027126ce0b Port #[non_exhaustive] to the new attribute parsing infrastructure 2025-07-04 20:30:42 +02:00
Michael Goulet
dc8cac8e8d Nits 2025-07-04 18:26:09 +00:00
Michael Goulet
0ad96c1e1f Fix elided lifetimes in rustdoc 2025-07-04 18:26:09 +00:00
Michael Goulet
d79b669b09 Fix pretty printing of placeholder types 2025-07-04 18:26:09 +00:00
Michael Goulet
74570e526e Same for types 2025-07-04 18:26:09 +00:00
Michael Goulet
42c9bfd2b9 Remove Symbol for Named LateParam/Bound variants 2025-07-04 18:14:22 +00:00