Commit Graph

167156 Commits

Author SHA1 Message Date
Chayim Refael Friedman a958b84ea4 Fix merging of import granularity setting with the granularity we infer
Previously it was wrong for some combinations.
2025-10-05 17:47:11 +03:00
Ralf Jung f28b8d4f15 deduplicate warnings globally 2025-10-05 15:53:07 +02:00
Jieyou Xu a8b9a57674 bootstrap: relax compiler-rt root assertion
Not needed during tests.
2025-10-05 20:30:52 +08:00
Chayim Refael Friedman c13b87752a Deprecate preserve import granularity option
It didn't do anything (behaved like `item`), as with `enforceGranularity = false` (which is the default), the style of the current file is always preferred, regardless of the setting.

We could make it fail when the setting is `preserve` and the current file's style could not be detected, but that makes little sense.

It is a bit weird that the default is `crate` but `preserve` falls back to `item`, however that was the previous behavior.
2025-10-05 15:19:52 +03:00
Jieyou Xu 7ed476f51f bootstrap: don't build redirect pages during dry-run/test 2025-10-05 20:18:38 +08:00
Remo Senekowitsch a4d51da309 docs: Mention editor-independent configuration 2025-10-05 13:41:28 +02:00
Stuart Cook cc1a80629f Rollup merge of #144908 - GuillaumeGomez:fix-doctest-output-json, r=fmease
Fix doctest output json

Fixes rust-lang/rust#144798.

Hopefully it will work with the new changes in `libtest` without needing to do both at once.

This PR moves the `rustdoc` merged doctest extra information directly into `libtest` to ensure they share the same rendering to prevent the bug uncovered in rust-lang/rust#144798.

cc `@lolbinary` (as you reviewed the first PR)

And since we're making changes to `libtest`:

r? `@Amanieu`
2025-10-05 22:15:05 +11:00
A4-Tacks 22c1eb85f8 minor: Remove FIXME for test_tuple_field_inference
This seems to have been fixed
2025-10-05 15:35:30 +08:00
Chayim Refael Friedman 41dd2b69a6 Switch to home-made db attaching infrastructure
Instead of using Salsa's, as we can no longer can a `dyn HirDatabase` from the `dyn salsa::Database` Salsa provides.
2025-10-05 09:55:50 +03:00
Chayim Refael Friedman 995ba5f3b7 Merge pull request #20795 from A4-Tacks/parse-edition-extract-expr-format-str
minor: Fix CURRENT_FIXME for extract_expressions_from_format_string
2025-10-05 06:53:17 +00:00
Chayim Refael Friedman fcf7795d58 Merge pull request #20793 from A4-Tacks/diag-paren-missing-unsafe
Fix missing parentheses for missing_unsafe
2025-10-05 06:52:31 +00:00
A4-Tacks c7ed41ebd0 Fix parentheses for missing_unsafe
I seem unable to use `Expr::needs_parens*` to complete it

Example
---
```rust
static mut STATIC_MUT: u8 = 0;

fn foo() -> u8 {
    STATIC_MUT$0 * 2
}
```

**Before this PR**:

```rust
static mut STATIC_MUT: u8 = 0;

fn foo() -> u8 {
    unsafe { STATIC_MUT } * 2
}
```

**After this PR**:

```rust
static mut STATIC_MUT: u8 = 0;

fn foo() -> u8 {
    (unsafe { STATIC_MUT }) * 2
}
```
2025-10-05 14:02:49 +08:00
A4-Tacks b74760a664 minor: Fix CURRENT_FIXME for extract_expressions_from_format_string 2025-10-05 13:54:07 +08:00
Manuel Drehwald 765e2fe6ee Add potential instability warning 2025-10-05 01:38:29 -04:00
Stuart Cook ff86a7db83 Rollup merge of #147309 - alexcrichton:wasm-unwinding-docs, r=jieyouxu
Add documentation about unwinding to wasm targets

This commit adds some documentation about the state of `-Cpanic=unwind` for the following wasm targets:

* `wasm32-unknown-unknown`
* `wasm32-wasip1`
* `wasm32-wasip2`
* `wasm32v1-none`

Notably it's possible to use `-Cpanic=unwind` with `-Zbuild-std` and it's also mentioned that there are no concrete proposals at this time to adding a new set of targets which support unwinding. My hunch is that in a few years' time it would make sense to enable it by default on these targets (except for `wasm32v1-none`) but that's a problem for future folks to debate. For now this is an attempt to document the status quo.
2025-10-05 15:35:02 +11:00
Manuel Drehwald a175921d5e update libEnzyme file name, and add missing strict-aliasing flag 2025-10-04 23:52:33 -04:00
Zalathar 33c99a0468 Use new DirectiveLine features in directive parsing 2025-10-05 10:47:21 +11:00
Zalathar 6783e9465b Allow easy extraction of name/value from a DirectiveLine 2025-10-05 10:47:21 +11:00
Zalathar 757d98ce2b Move DirectiveLine into its own submodule 2025-10-05 10:47:19 +11:00
Tshepang Mbambo 5a38eb1ba8 a consistency fix
Others in the file skip the module name
2025-10-05 00:00:16 +02:00
Kivooeo 67bc030833 change flt back to ftl 2025-10-04 18:18:58 +00:00
bors 2cb4e7dce8 Auto merge of #147340 - matthiaskrgr:rollup-icymmsc, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#142670 (Document fully-qualified syntax in `as`' keyword doc)
 - rust-lang/rust#145685 (add CloneFromCell and Cell::get_cloned)
 - rust-lang/rust#146330 (Bump unicode_data and printables to version 17.0.0)
 - rust-lang/rust#146451 (Fix atan2 inaccuracy in documentation)
 - rust-lang/rust#146479 (add mem::conjure_zst)
 - rust-lang/rust#147117 (interpret `#[used]` as `#[used(compiler)]` on illumos)
 - rust-lang/rust#147190 (std: `sys::net` cleanups)
 - rust-lang/rust#147251 (Do not assert that a change in global cache only happens when concurrent)
 - rust-lang/rust#147280 (Return to needs-llvm-components being info-only)
 - rust-lang/rust#147315 (bless autodiff batching test)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-04 18:08:24 +00:00
itsjunetime c7d00075d9 Deduplicate sort+dedup calls 2025-10-04 13:00:09 -05:00
Cameron Steffen c44500b4a1 Remove boxes from ast Pat lists 2025-10-04 12:39:58 -05:00
itsjunetime 82e2c67452 Move salsa attach to end before call to run_ide_things 2025-10-04 12:30:15 -05:00
David Barsky 3350c27d91 internal: bump salsa to 0.24 2025-10-04 09:47:26 -07:00
Matthias Krüger 6c24eeeb62 Rollup merge of #147280 - workingjubilee:you-can-put-your-gcc-in-my-llvm-components, r=Kobzol
Return to needs-llvm-components being info-only

Partially revert a535042e80

Even with non-LLVM codegen backends, we want to allow for annotations that express dependencies to LLVM-specific parts of the test suite. This includes `//@ needs-llvm-components`, which just allows checking that LLVM is built with relevant target support before the test is run. It does not assert the test cannot work with another codegen backend.
2025-10-04 17:11:12 +02:00
Weihang Lo b4578775b4 Update cargo submodule 2025-10-04 10:22:41 -04:00
A4-Tacks 8607cfedc4 minor: Fix using make::ty for extract_type_alias 2025-10-04 19:33:29 +08:00
bors 99b9a88503 Auto merge of #147323 - chenyukang:yukang-fix-tidy-check, r=jieyouxu
Fix top level ui tests check in tidy

I got an error when pushing code:

```console
fmt check
fmt: checked 6330 modified files
tidy check
tidy [ui_tests (tests)]: ui tests should be added under meaningful subdirectories: `/Users/yukang/rust/tests/ui/.DS_Store`
tidy [ui_tests (tests)]: FAIL
```

I think it's better to use `ignore::WalkBuilder` for checking the path.

r? `@jieyouxu`
2025-10-04 10:22:52 +00:00
许杰友 Jieyou Xu (Joe) 3f6f94e251 Merge pull request #2599 from rust-lang/tshepang-patch-5 2025-10-04 16:04:25 +08:00
yukang 422b91443f Fix top level ui tests check in tidy 2025-10-04 15:18:16 +08:00
bors a0f398e89d Auto merge of #147308 - matthiaskrgr:rollup-ov04tbi, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#147245 (only replace the intended comma in pattern suggestions)
 - rust-lang/rust#147269 (Add regression test for 123953)
 - rust-lang/rust#147277 (Extract common logic for iterating over features)
 - rust-lang/rust#147292 (Respect `-Z` unstable options in `rustdoc --test`)
 - rust-lang/rust#147300 (Add xtensa arch to object file creation)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-04 06:19:58 +00:00
Alex Crichton fd96a78092 Add documentation about unwinding to wasm targets
This commit adds some documentation about the state of `-Cpanic=unwind`
for the following wasm targets:

* `wasm32-unknown-unknown`
* `wasm32-wasip1`
* `wasm32-wasip2`
* `wasm32v1-none`

Notably it's possible to use `-Cpanic=unwind` with `-Zbuild-std` and
it's also mentioned that there are no concrete proposals at this time to
adding a new set of targets which support unwinding. My hunch is that in
a few years' time it would make sense to enable it by default on these
targets (except for `wasm32v1-none`) but that's a problem for
future folks to debate. For now this is an attempt to document the
status quo.
2025-10-03 13:08:07 -07:00
Matthias Krüger dbc5e72ea2 Rollup merge of #147292 - Urgau:rustdoc-test-unstable_opts, r=fmease
Respect `-Z` unstable options in `rustdoc --test`

This PR makes rustdoc respect `-Z` unstable options when collecting doctests (`rustdoc --test`).

In the process I also realized that `--error-format` wasn't respected as well, making UI annotations impossible to write so I fixed that as well.

Best reviewed commit by commit.

Fixes https://github.com/rust-lang/rust/issues/147276
Fixes https://github.com/rust-lang/rust/issues/143930
r? fmease
2025-10-03 21:10:33 +02:00
Guillaume Gomez 58889457ca Display merged doctests times as expected depending on the format specified 2025-10-03 18:02:05 +02:00
Weihang Lo e43a0b6bdb Update cargo submodule 2025-10-03 11:58:30 -04:00
Urgau e914a1a6e0 Respect --error-format in rustdoc --test 2025-10-03 17:04:17 +02:00
Tshepang Mbambo 74caed9a45 cg_gcc.md: add missing quote 2025-10-03 15:15:45 +02:00
Urgau 3d5f54ad55 Respect -Z unstable options in rustdoc --test 2025-10-03 12:05:31 +02:00
bors dd091003ac Auto merge of #145898 - lolbinarycat:rustdoc-search-trait-parent, r=GuillaumeGomez,notriddle
If a trait item appears in rustdoc search, hide the corrosponding impl items

fixes rust-lang/rust#138251

cc `@notriddle`
2025-10-03 08:43:43 +00:00
The Miri Cronjob Bot 6beb612c13 Merge ref '3b8665c5ab3a' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 3b8665c5ab
Filtered ref: 67ff7e0b0141ef570f3c1ca7e643faf55b58b7f1
Upstream diff: https://github.com/rust-lang/rust/compare/42b384ec0dfcd528d99a4db0a337d9188a9eecaa...3b8665c5ab3aeced9b01672404c3764583e722ca

This merge was created using https://github.com/rust-lang/josh-sync.
2025-10-03 05:00:28 +00:00
The Miri Cronjob Bot 8583e1582e Prepare for merging from rust-lang/rust
This updates the rust-version file to 3b8665c5ab.
2025-10-03 04:52:46 +00:00
Chayim Refael Friedman 48df0e2833 Fix erroneous diagnostic incorrect_generics_len when there are generics on enum variant used through type alias 2025-10-03 06:54:32 +03:00
Stuart Cook 9e1b24d9e4 Rollup merge of #147270 - GuillaumeGomez:move-cfg-code, r=lolbinarycat
Move doc_cfg-specific code into `cfg.rs`

Follow-up of https://github.com/rust-lang/rust/pull/138907.

r? lolbinarycat
2025-10-03 09:16:29 +10:00
Stuart Cook 87c7946c8f Rollup merge of #147268 - davidtwco:add-arm-maintainers-to-targets, r=lqd
add arm-maintainers to various targets

Add the ``@rust-lang/arm-maintainers`` team as maintainers to the following targets:

- `aarch64-unknown-linux-gnu`
- `aarch64-unknown-none`/`aarch64-unknown-none-softfloat`
- `aarch64-unknown-uefi`
- `armv7-unknown-linux-gnueabi`/`armv7-unknown-linux-gnueabihf`
- `armv7a-none-eabi`/`armv7a-none-eabihf`
- `armv7r-none-eabi`/`armv7r-none-abihf`
- `armv8r-none-eabihf`
- `thumbv7em-none-eabi`/`thumbv7em-none-eabihf`
- `thumbv7m-none-eabi`
- `thumbv8m.base-none-eabi`
- `thumbv8m.main-none-eabi`/`thumbv8m.main-none-eabihf`

cc `@thejpster`
2025-10-03 09:16:29 +10:00
Stuart Cook 6fe05b5162 Rollup merge of #146166 - ferrocene:pvdrz/edition-range, r=fmease,jieyouxu
Implement range support in `//@ edition`

First step to solve https://github.com/rust-lang/rust/issues/145364
2025-10-03 09:16:27 +10:00
Stuart Cook a3291ede1a Rollup merge of #141839 - tshepang:ease-lsp-use, r=Mark-Simulacrum,fee1-dead
make rust-analyzer use a dedicated build directory

inspired by https://github.com/rust-lang/rust/pull/132794
2025-10-03 09:16:26 +10:00
Alex Crichton ce2087692f Add a new wasm32-wasip3 target to Rust
This commit adds a new tier 3 target to rustc, `wasm32-wasip3`. This
follows in the footsteps of the previous `wasm32-wasip2` target and is
used to represent binding to the WASIp3 set of APIs managed by the WASI
subgroup to the WebAssembly Community Group.

As of now the WASIp3 set of APIs are not finalized nor standardized.
They're in the process of doing so and the current trajectory is to have
the APIs published in December of this year. The goal here is to get the
wheels turning in Rust to have the target in a
more-ready-than-nonexistent state by the time this happens in December.

For now the `wasm32-wasip3` target looks exactly the same as
`wasm32-wasip2` except that `target_env = "p3"` is specified. This
indicates to crates in the ecosystem that WASIp3 APIs should be used,
such as the [`wasip3` crate]. Over time this target will evolve as
implementation in guest toolchains progress, notably:

* The standard library will use WASIp3 APIs natively once they're
  finalized in the WASI subgroup.
* Support through `wasi-libc` will be updated to use WASIp3 natively
  which Rust will then transitively use.
* Longer-term, features such as cooperative multithreading will be added
  to the WASIp3-track of targets to enable using `std::thread`, for
  example, on this target.

These changes are all expected to be non-breaking changes for users of
this target. Runtimes supporting WASIp3, currently Wasmtime and Jco,
support WASIp2 APIs as well and will work with components whether or not
they import WASIp2, both WASIp2 and WASIp3, or just WASIp3 APIs. This
means that changing the internal implementation details of libstd over
time is expected to be a non-breaking change.

[`wasip3` crate]: https://crates.io/crates/wasip3
2025-10-02 15:09:09 -07:00
Jubilee Young 99550fbc3e Return to needs-llvm-components being info-only
Partially revert a535042e80

Even with non-LLVM codegen backends, we want to allow for annotations
that express dependencies to LLVM-specific parts of the test suite.
This includes `//@ needs-llvm-components`, which just allows checking
that LLVM is built with relevant target support before the test is run.
It does not assert the test cannot work with another codegen backend.
2025-10-02 14:39:18 -07:00