Commit Graph

300570 Commits

Author SHA1 Message Date
Chayim Refael Friedman
f5238432ce Merge pull request #20172 from vxpm/syntax-tree-extension
remove `rust-analyzer/syntaxTree` from docs
2025-07-05 19:43:19 +00:00
Chayim Refael Friedman
4aa30b513f Fix diverging destructuring assignments
They need to return `!`, unlike diverging ordinary assignments. See the comment in the code.
2025-07-05 22:35:22 +03:00
Jonathan Brouwer
2d8ffff10a Port #[ignore] to the new attribute parsing infrastructure
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-05 21:23:09 +02:00
Michael Goulet
4185874592 Don't compress input universes 2025-07-05 18:41:59 +00:00
bit-aloo
312de35d3a restructure try_run_tests 2025-07-06 00:11:20 +05:30
Michael Goulet
7f5d286de3 Canonicalize input ty/ct infer/placeholder in the root universe 2025-07-05 18:37:54 +00:00
Michael Goulet
8eb9f70979 Stop using Key trait randomly 2025-07-05 18:37:11 +00:00
Michael Goulet
995eeeb54c Don't call predicates_of on a dummy obligation cause's body id 2025-07-05 17:47:28 +00:00
bors
175e04331b Auto merge of #143496 - saethlin:rollup-4u43rgj, r=saethlin
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#143291 (codegen_ssa: replace a Result by an Either)
 - rust-lang/rust#143445 (move `va_copy`, `va_arg` and `va_end` to `core::intrinsics`)
 - rust-lang/rust#143447 ([COMPILETEST-UNTANGLE 4/N] Improve compiletest config documentation)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-05 17:32:26 +00:00
Ben Kimock
53757e6725 Rollup merge of #143447 - jieyouxu:compiletest-maintenance-4, r=Kobzol
[COMPILETEST-UNTANGLE 4/N] Improve compiletest config documentation

This is part of a patch series to untangle `compiletest` to hopefully nudge it towards being more maintainable.

This PR should contain **no functional changes**.

This is pulled out to its own PR to make follow-up changes easier to review.

There are *intentionally* a *lot* of FIXME comments, intended to be gradually addressed in follow-ups.

r? `@Kobzol`
2025-07-05 12:32:54 -04:00
Ben Kimock
7245febecd Rollup merge of #143445 - folkertdev:va-list-intrinsics, r=RalfJung
move `va_copy`, `va_arg` and `va_end` to `core::intrinsics`

some questions:

- should these functions be `pub`?
- is a separate module justified?

r? `@RalfJung`
2025-07-05 12:32:53 -04:00
Ben Kimock
61bdd11b20 Rollup merge of #143291 - RalfJung:result-isnt-either, r=scottmcm
codegen_ssa: replace a Result by an Either

`Err` here clearly does not indicate an "error" of any sort, so the use of `Result` is confusing. Let's use a sum type that does not come with the baggage of `Result`.
2025-07-05 12:32:53 -04:00
Diggory Blake
ea7b756875 Make tempfile a normal dependency 2025-07-05 17:24:22 +01:00
binarycat
c1ed2ac8a2 tidy: add specific error message for trying to use spellcheck:fix. 2025-07-05 10:24:17 -05:00
Camille GILLOT
39ee1b2d77 Remove yields_in_scope from the scope tree. 2025-07-05 15:24:15 +00:00
binarycat
971feb6185 tidy: use --bless for tidy spellcheck instead of spellcheck:fix
previous behavior was inconsistent with existing extra checks.
2025-07-05 10:17:31 -05:00
Diggory Blake
a839b071f7 Use object crate from crates.io to fix windows build error 2025-07-05 15:58:42 +01:00
Ralf Jung
3cd13f72a2 codegen_ssa: replace a Result by an Either 2025-07-05 15:53:56 +02:00
A4-Tacks
1d7fde3085 Fix Borrow and BorrowMut define from beta std 2025-07-05 21:49:56 +08:00
bors
6dec76f1c2 Auto merge of #143474 - jieyouxu:bootstrap-llvm-snapshot, r=Kobzol
Pretend in bootstrap snapshot tests that we always build in-tree LLVM

Otherwise, depending on whether CI LLVM is inhibited or if an externally-provided LLVM is used, bootstrap host LLVM build step could be missing in step snapshots.

Note that I'm not sure if this is the *right* solution (this might be *a* solution). I imagine we do want to control for the set of configuration that these snapshot tests are run, as much as possible.

r? `@Kobzol`
2025-07-05 12:42:59 +00:00
Camille GILLOT
90762c26b6 Complete mut_visit. 2025-07-05 12:37:17 +00:00
Adrian Friedli
44d7238d86 remove armv5te-unknown-linux-gnueabi target maintainer 2025-07-05 13:24:24 +02:00
Josh Triplett
6b71399d38 mbe: Introduce an enum for which part of a rule we're parsing
Rather than a `bool` that's `true` for the LHS and `false` for the RHS,
use a self-documenting enum.
2025-07-05 03:07:15 -07:00
Ralf Jung
b2d8c81f7f Merge pull request #4444 from devnexen/filemetadata_upd
shims::fs adding more fields to FileMetadata
2025-07-05 10:05:21 +00:00
Ralf Jung
ef0490c868 minor cleanup 2025-07-05 11:40:37 +02:00
bors
fd9ca711a3 Auto merge of #143473 - workingjubilee:rollup-bxie7zg, r=scottmcm
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#142440 (`tests/ui`: A New Order [14/N])
 - rust-lang/rust#143040 (Add `const Rem`)
 - rust-lang/rust#143086 (Update poison.rs to fix the typo (sys->sync))
 - rust-lang/rust#143202 (`tests/ui`: A New Order [18/N])
 - rust-lang/rust#143296 (`tests/ui`: A New Order [21/N])
 - rust-lang/rust#143297 (`tests/ui`: A New Order [22/N])
 - rust-lang/rust#143299 (`tests/ui`: A New Order [24/N])
 - rust-lang/rust#143300 (`tests/ui`: A New Order [25/N])
 - rust-lang/rust#143397 (test passing a `VaList` from rust to C)
 - rust-lang/rust#143410 (Block SIMD in transmute_immediate; delete `OperandValueKind`)
 - rust-lang/rust#143452 (Fix CLI completion check in `tidy`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-05 09:37:08 +00:00
David Carlier
d87984e129 shims::fs adding more fields to FileMetadata
addressing, partially at least, FIXME comment and
targetting unixes, adding device, user and group ids.
2025-07-05 10:10:32 +01:00
ia0
db0b491258 Fix short linker error output
This PR does 2 things:

- It removes the braces when there's a single element. This is required since brace expansion (at
  least in bash and zsh) only triggers if there's at least 2 elements.

- It removes the extra `.rlib` suffixes of the elements. See
  https://github.com/rust-lang/rust/pull/135707#discussion_r2185212393 for context.

Running `cargo +stage1 build` on the following program:

```rust
unsafe extern "C" {
    fn foo() -> libc::c_int;
}

fn main() {
    let x = unsafe { foo() } as u32;
    // println!("{}", data_encoding::BASE64.encode(&x.to_le_bytes()));
}
```

Gives the following diff before and after the PR:

```diff
-/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib}.rlib
+/tmp/foo/target/debug/deps/liblibc-faf416f178830595.rlib
```

Running on the same program with the additional dependency, we get the following diff:

```diff
-/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib,libdata_encoding-84bb5aadfa9e8839.rlib}.rlib
+/tmp/foo/target/debug/deps/{liblibc-faf416f178830595,libdata_encoding-84bb5aadfa9e8839}.rlib
```

Do we want to add a UI test?
2025-07-05 11:07:03 +02:00
Ralf Jung
6ea0b65c09 Merge pull request #4447 from RalfJung/miri-script-msrv
miri-script: set msrv so clippy doesn't suggest too-new features
2025-07-05 08:59:43 +00:00
Folkert de Vries
ed3711ea29 use div_ceil instead of manual logic 2025-07-05 10:55:42 +02:00
Folkert de Vries
226b0fbe11 use is_multiple_of instead of manual modulo 2025-07-05 10:55:35 +02:00
Ralf Jung
a1f4172afa update lockfile 2025-07-05 10:39:03 +02:00
Ralf Jung
43506591e8 miri-script: set msrv so clippy doesn't suggest too-new features 2025-07-05 10:32:21 +02:00
Ralf Jung
6e3e05befc Merge pull request #4445 from RalfJung/rustup
Rustup
2025-07-05 07:36:55 +00:00
Jieyou Xu
7405e2a915 Improve compiletest config documentation
Including a bunch of FIXMEs.
2025-07-05 15:19:48 +08:00
Folkert de Vries
4ae22fba5b move the va_copy, va_arg and va_end to core::intrinsics 2025-07-05 09:18:49 +02:00
Ralf Jung
72043e3181 fmt 2025-07-05 09:12:36 +02:00
Ralf Jung
61f3705920 Merge from rustc 2025-07-05 09:12:26 +02:00
Trevor Gross
c4d9c0f248 tests: Use cfg_target_has_reliable_f16_f128
`conv-bits-runtime-const` gates `f16` and `f128` tests behind `x86_64`,
but this isn't always accurate. In particular, x86 `MinGW` has an ABI
bug [1] which means things work when linked to our Rust math libraries
but don't work with host libraries. RUST-143405 slightly adjusts which
targets we provide `f16` and `f128` symbols for and effectively removes
MinGW from that list, meaning host libraries start getting linked,
meaning `f16` and `f128` tests start to fail.

Account for this by changing the gates in one such test to
`cfg(target_has_reliable_{f16,f128})` which is the way we should be
gating all behavior related to the types going forward.

`rustfmt` also seems to have formatted the macros which is fine.

[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054
2025-07-05 02:02:09 -05:00
Ralf Jung
1620117f94 Preparing for merge from rustc 2025-07-05 09:01:43 +02:00
Jieyou Xu
006e97a234 Pretend in bootstrap snapshot tests that we always build in-tree LLVM 2025-07-05 14:54:12 +08:00
dianne
bb64315978 only check for mixed deref/normal constructors when needed 2025-07-04 23:47:31 -07:00
dianne
50061f3b11 always check for mixed deref pattern and normal constructors
This makes it work for box patterns and in rust-analyzer.
2025-07-04 23:47:31 -07:00
dianne
26fd40e325 hir_ty::match_check: remove special handling for box patterns 2025-07-04 23:43:49 -07:00
bors
f0b67dd97d Auto merge of #139598 - compiler-errors:no-bound-var-symbol, r=WaffleLapkin
Remove `Symbol` from `Named` variant of `BoundRegionKind`/`LateParamRegionKind`

The `Symbol` is redundant, since we already store a `DefId` in the region variant. Instead, load the name via `item_name` when needed (which is almost always on the diagnostic path).

This introduces a `BoundRegionKind::NamedAnon` which is used for giving anonymous bound regions names, but which should only be used during pretty printing and error reporting.
2025-07-05 06:29:56 +00:00
Jubilee
77ae27084e Rollup merge of #143452 - Kobzol:completions-fix, r=jieyouxu
Fix CLI completion check in `tidy`

The list of CLI completion files that were generated and that were checked by `x test tidy` was not synced. Recently, some PR only updated some of the files, which caused the rest of the files (not checked by `x test tidy`) to be dirty on `master`. This PR fixes the logic in bootstrap to always synchronize the list of completion paths.

Fixes: https://github.com/rust-lang/rust/issues/143451

r? `@jieyouxu`
2025-07-04 23:26:25 -07:00
Jubilee
33eb552ceb Rollup merge of #143410 - scottmcm:redo-transmute-again, r=RalfJung,workingjubilee
Block SIMD in transmute_immediate; delete `OperandValueKind`

Vectors have been causing me problems for years in this code, for example https://github.com/rust-lang/rust/pull/110021#discussion_r1160975086 and https://github.com/rust-lang/rust/pull/143194

See conversation in <https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Is.20transmuting.20a.20.60T.60.20to.20.60Tx1.60.20.28one-element.20SIMD.20vector.29.20UB.3F/near/526262799>.

By blocking SIMD in `transmute_immediate` it can be simplified to just take the `Scalar`s involved -- the backend types can be gotten from those `Scalar`s, rather than needing to be passed.  And there's an assert added to ICE it if it does get hit.

Accordingly, this changes `rvalue_creates_operand` to not send SIMD transmutes through the operand path, but to always go through memory instead, like they did back before rust-lang/rust#108442.

And thanks to those changes, I could also remove the `OperandValueKind` type that I added back then which `@RalfJung` rightly considers pretty sketchy.

cc `@folkertdev` `@workingjubilee` from the zulip conversation too
2025-07-04 23:26:24 -07:00
Jubilee
5b509e6158 Rollup merge of #143397 - folkertdev:test-variadic-call-from-rust-to-c, r=RalfJung
test passing a `VaList` from rust to C

Have C define various functions that take a `...` or `va_list` as an argument, and call them from rust. As far as I can see, this just wasn't actually tested before.

In particular this tests a difference between rust `VaList` and C `va_list` where C uses array-to-pointer decay, but rust cannot.

I've locally tested this for

- `x86_64-unknown-linux-gnu`
- `aarch64-unknown-linux-gnu`
- `s390x-unknown-linux-gnu`
- `powerpc64-unknown-linux-gnu`
- `powerpc64le-unknown-linux-gnu`

The latter 2 use an opaque pointer, the first 3 use a single-element array.

cc `@beetrees` if you see anything incorrect here

r? `@workingjubilee`
2025-07-04 23:26:24 -07:00
Jubilee
5f415da0b5 Rollup merge of #143300 - Kivooeo:tf25, r=tgross35
`tests/ui`: A New Order [25/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:23 -07:00
Jubilee
069f571fad Rollup merge of #143299 - Kivooeo:tf24, r=tgross35
`tests/ui`: A New Order [24/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:23 -07:00