Commit graph

160871 commits

Author SHA1 Message Date
Matthias Krüger
87dfd1245f
Rollup merge of #139523 - BoxyUwU:rgd-push, r=jieyouxu
Rustc dev guide subtree update

r? `@jieyouxu`
2025-04-08 21:26:00 +02:00
Matthias Krüger
40be0470b5
Rollup merge of #139520 - jieyouxu:compiletest-maintenance-1, r=lqd
compiletest maintenance: sort deps and drop dep on `anyhow`

Two changes:

1. Sort compiletest deps alphabetically because it was annoying me (harder to quickly glance what deps compiletest is using).
2. Drop dependency on `anyhow`. There's only one usage of `anyhow`, which is for `with_context` on sth that would immediately panic anyway.
2025-04-08 21:26:00 +02:00
Matthias Krüger
df9796f20d
Rollup merge of #139506 - tshepang:patch-6, r=jieyouxu
add missing word in doc comment (part 2)
2025-04-08 21:25:59 +02:00
Matthias Krüger
7661224f1e
Rollup merge of #139496 - Skgland:139455-went-too-far, r=Veykril
Revert r-a changes of rust-lang/rust#139455

I discovered https://github.com/rust-lang/rust/issues/132735#issuecomment-2784205477 that I might have done too much in rust-lang/rust#132735 by also removing support in r-a.
So this reverts the commit with the changes to r-a.

r? RalfJung
2025-04-08 21:25:58 +02:00
bors
f820b75fee Auto merge of #139525 - Zalathar:rollup-5t5xsrw, r=Zalathar
Rollup of 10 pull requests

Successful merges:

 - #138676 (Implement overflow for infinite implied lifetime bounds)
 - #139024 (Make error message for missing fields with `..` and without `..` more consistent)
 - #139098 (Tell LLVM about impossible niche tags)
 - #139124 (compiler: report error when trait object type param reference self)
 - #139321 (Update to new rinja version (askama))
 - #139346 (Don't construct preds w escaping bound vars in `diagnostic_hir_wf_check`)
 - #139386 (make it possible to use stage0 libtest on compiletest)
 - #139421 (Fix trait upcasting to dyn type with no principal when there are projections)
 - #139464 (Allow for reparsing failure when reparsing a pasted metavar.)
 - #139490 (Update some comment/docs related to "extern intrinsic" removal)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-08 12:05:54 +00:00
Stuart Cook
42fdd7deee
Rollup merge of #139490 - RalfJung:unstable-intrinsics-docs, r=oli-obk
Update some comment/docs related to "extern intrinsic" removal

Follow-up to https://github.com/rust-lang/rust/pull/139455.

r? `@oli-obk`
2025-04-08 20:55:12 +10:00
Stuart Cook
ab80f575c4
Rollup merge of #139386 - onur-ozkan:configurable-compiletest-libtest, r=jieyouxu,kobzol
make it possible to use stage0 libtest on compiletest

With https://github.com/rust-lang/rust/pull/119899, building the library tree will require a stage 1 compiler. This is because `compiletest` is defined as a `ToolStd` (since https://github.com/rust-lang/rust/pull/68019) in order to use the in-tree library. As a result, https://github.com/rust-lang/rust/pull/119899 makes certain development workflows more difficult as changes on the compiler tree will now require recompiling `compiletest` each time.

This PR allows switching `ToolStd` to `ToolBootstrap` with a simple boolean option in `bootstrap.toml` to allow `compiletest` to use the stage 0 `libtest` instead.

The changes under `src/ci` are clearly intended to make sure that `compiletest` doesn't break during future bootstrap beta bumps.
2025-04-08 20:55:08 +10:00
Stuart Cook
dd682f7750
Rollup merge of #139321 - GuillaumeGomez:update-rinja, r=notriddle,lolbinarycat,yotamofek
Update to new rinja version (askama)

Askama maintenance was handed over to rinja maintainers so new `rinja` release is actually `askama`. More information [here](https://blog.guillaume-gomez.fr/articles/2025-03-19+Askama+and+Rinja+merge).

r? ``@notriddle``
2025-04-08 20:55:05 +10:00
Ralf Jung
742b378371 make hover_feature test less fragile 2025-04-08 12:13:17 +02:00
bors
e5fefc359b Auto merge of #139474 - jieyouxu:bump-rustc-perf, r=Kobzol
rustc-perf: update to `c0f3b53c8e5de87714d18a5f42998859302ae03a`

Hopefully unblocks https://github.com/rust-lang/rust/pull/139279.

r? `@Kobzol` (or compiler)
`@bors` rollup=never
2025-04-08 08:56:34 +00:00
Jieyou Xu
603685cd74
compiletest: drop dependency on anyhow
Currently `compiletest` panics all over the place but doesn't really use
`anyhow` anyway. I'd like to introduce some more principled error
handling and disciplined diagnostic reporting in the near future.
2025-04-08 16:11:26 +08:00
Jieyou Xu
3dec37f1cc
compiletest: sort dependencies alphabetically 2025-04-08 16:09:03 +08:00
Tshepang Mbambo
eb4bc2ccfb
add missing word in doc comment (part 2) 2025-04-08 03:48:14 +02:00
Bennet Bleßmann
bc2912386f
Revert "remove rust-analyser support for extern "rust-intrinsic" blocks"
This reverts commit 51b51b51d7.
2025-04-07 20:30:27 +02:00
Ralf Jung
e1a69da856 unstable-book/intrinsics: wordsmith MIR-lowering intrinsic docs 2025-04-07 18:17:00 +02:00
onur-ozkan
cae28b5119 implement check step for compiletest separately
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-07 16:23:44 +03:00
Stuart Cook
9209c5eb60
Rollup merge of #139455 - Skgland:remove_rust-intrinsic_ABI, r=oli-obk
Remove support for `extern "rust-intrinsic"` blocks

Part of rust-lang/rust#132735

Looked manageable and there didn't appear to have been progress in the last two weeks,
so decided to give it a try.
2025-04-07 22:29:20 +10:00
Stuart Cook
82df6229b6
Rollup merge of #139035 - nnethercote:PatKind-Missing, r=oli-obk
Add new `PatKind::Missing` variants

To avoid some ugly uses of `kw::Empty` when handling "missing" patterns, e.g. in bare fn tys. Helps with #137978. Details in the individual commits.

r? ``@oli-obk``
2025-04-07 22:29:17 +10:00
Jieyou Xu
c3999f1320
tidy: remove instant dep exclusion 2025-04-07 15:19:59 +08:00
Jieyou Xu
5f7fa4f975
rustc-perf: update to c0f3b53c8e5de87714d18a5f42998859302ae03a 2025-04-07 15:19:38 +08:00
onur-ozkan
c8306650ba enable in-tree std on some runners
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-07 10:08:08 +03:00
Jakub Beránek
1b8dbda9c7
Rollup merge of #139456 - calebcartwright:style-let-chains-final, r=joshtriplett
style guide: add let-chain rules

Reopens #110568

refs #53667 and I suppose #132833 as well

This reflects the style rules that the style team had already agreed upon back in 2023, with the addition of literals in the lhs being permissible for single line formatting, and the removal of unnecessary language/example snippets around non-`&&` operators that was a small hiccup in the original PR.

It also reflects current formatting behavior implemented in rustfmt (though note that the adjustment to include literals has been implemented & merged, but is still pending a sync to nightly)
2025-04-07 08:23:35 +02:00
Tshepang Mbambo
eb676fd2da
improve flow 2025-04-07 06:42:37 +02:00
The rustc-dev-guide Cronjob Bot
5a28e1e8de Merge from rustc 2025-04-07 04:12:22 +00:00
The rustc-dev-guide Cronjob Bot
f74e85e2c2 Preparing for merge from rustc 2025-04-07 04:06:33 +00:00
Caleb Cartwright
ee07e3f83f doc(style): add let-chain rules 2025-04-06 19:07:56 -05:00
bors
2fa8b11f09 Auto merge of #136077 - rust-lang:cargo_update, r=clubby789
Weekly `cargo update`

Automation to keep dependencies in `Cargo.lock` current.

The following is the output from `cargo update`:

```txt

compiler & tools dependencies:
     Locking 11 packages to latest compatible versions
    Updating blake3 v1.8.0 -> v1.8.1
    Updating ctrlc v3.4.5 -> v3.4.6
    Updating env_logger v0.11.7 -> v0.11.8
    Updating errno v0.3.10 -> v0.3.11
    Updating flate2 v1.1.0 -> v1.1.1
    Updating indexmap v2.8.0 -> v2.9.0
    Updating miniz_oxide v0.8.5 -> v0.8.7
    Updating openssl-sys v0.9.106 -> v0.9.107
    Updating redox_syscall v0.5.10 -> v0.5.11
    Updating smallvec v1.14.0 -> v1.15.0
    Updating tokio v1.44.1 -> v1.44.2
note: pass `--verbose` to see 40 unchanged dependencies behind latest

library dependencies:
     Locking 1 package to latest compatible version
    Updating miniz_oxide v0.8.5 -> v0.8.7
note: pass `--verbose` to see 4 unchanged dependencies behind latest

rustbook dependencies:
     Locking 30 packages to latest compatible versions
    Updating cc v1.2.17 -> v1.2.18
    Updating clap v4.5.32 -> v4.5.35
    Updating clap_builder v4.5.32 -> v4.5.35
    Updating darling v0.20.10 -> v0.20.11
    Updating darling_core v0.20.10 -> v0.20.11
    Updating darling_macro v0.20.10 -> v0.20.11
    Updating env_logger v0.11.7 -> v0.11.8
    Updating errno v0.3.10 -> v0.3.11
    Updating flate2 v1.1.0 -> v1.1.1
    Updating iana-time-zone v0.1.61 -> v0.1.63
    Updating icu_locid_transform_data v1.5.0 -> v1.5.1
    Updating icu_normalizer_data v1.5.0 -> v1.5.1
    Updating icu_properties_data v1.5.0 -> v1.5.1
    Updating indexmap v2.8.0 -> v2.9.0
    Updating log v0.4.26 -> v0.4.27
    Updating miniz_oxide v0.8.5 -> v0.8.7
    Updating once_cell v1.21.1 -> v1.21.3
    Updating pest v2.7.15 -> v2.8.0
    Updating pest_derive v2.7.15 -> v2.8.0
    Updating pest_generator v2.7.15 -> v2.8.0
    Updating pest_meta v2.7.15 -> v2.8.0
    Updating redox_syscall v0.5.10 -> v0.5.11
    Updating rustix v1.0.3 -> v1.0.5
    Updating smallvec v1.14.0 -> v1.15.0
    Updating string_cache v0.8.8 -> v0.8.9
    Updating windows-core v0.52.0 -> v0.61.0
      Adding windows-implement v0.60.0
      Adding windows-interface v0.59.1
      Adding windows-result v0.3.2
      Adding windows-strings v0.4.0
```
2025-04-06 19:57:47 +00:00
Bennet Bleßmann
6dfb29624c
update docs
- src\doc\nomicon\src\ffi.md should also have its ABI list updated
2025-04-06 21:41:47 +02:00
Skgland
51b51b51d7
remove rust-analyser support for extern "rust-intrinsic" blocks 2025-04-06 21:41:46 +02:00
Skgland
5eb535c568
remove compiler support for extern "rust-intrinsic" blocks 2025-04-06 21:32:58 +02:00
bors
fd4dc18e68 Auto merge of #139452 - GuillaumeGomez:rollup-u9edkjo, r=GuillaumeGomez
Rollup of 6 pull requests

Successful merges:

 - #138562 (Optimize slice {Chunks,Windows}::nth)
 - #138876 (Trusty: Implement `write_vectored` for stdio )
 - #139072 (Add `slice::align_to_uninit_mut`)
 - #139367 (Add `*_value` methods to proc_macro lib)
 - #139391 (Check if merged attributes list is empty in expr)
 - #139414 (Fix typo in `RawList`'s documentation)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-06 16:46:30 +00:00
Guillaume Gomez
ed81e347f1
Rollup merge of #139367 - GuillaumeGomez:proc-macro-values, r=Urgau
Add `*_value` methods to proc_macro lib

This is the (re-)implementation of https://github.com/rust-lang/libs-team/issues/459.

It allows to get the actual value (unescaped) of the different string literals.

It was originally done in https://github.com/rust-lang/rust/pull/136355 but it broke the artifacts build so we decided to move the crate to crates.io to go around this limitation.

Part of https://github.com/rust-lang/rust/issues/136652.

Considering this is a copy-paste of the originally approved PR, no need to go through the whole process again. \o/

r? `@Urgau`
2025-04-06 18:08:10 +02:00
bors
175dcc7773 Auto merge of #139439 - weihanglo:update-cargo, r=weihanglo
Update cargo

17 commits in a6c604d1b8a2f2a8ff1f3ba6092f9fda42f4b7e9..0e93c5bf6a1d5ee7bc2af63d1afb16cd28793601
2025-03-26 18:11:00 +0000 to 2025-04-05 00:00:24 +0000
- chore(deps): bump openssl from 0.10.71 to 0.10.72 (rust-lang/cargo#15394)
- chore(ci): restore cargo-util semver check (rust-lang/cargo#15389)
- docs(changelog): polish changelog items (rust-lang/cargo#15379)
- chore(deps): update msrv (1 version) to v1.86 (rust-lang/cargo#15381)
- chore: add aarch64 linux runner (rust-lang/cargo#15077)
- Added `build_directory` field to cargo metadata output (rust-lang/cargo#15377)
- chore(deps): update rust crate rusqlite to 0.34.0 (rust-lang/cargo#15373)
- Prevent undeclared public network access (rust-lang/cargo#15368)
- rename the `author` field to be `authors` in book.toml (rust-lang/cargo#15362)
- move modules from kebab-case to snake_case (rust-lang/cargo#14439)
- chore: bump to 0.89.0; update changelog (rust-lang/cargo#15372)
- docs(unstable): update `-Zrustdoc-depinfo` tracking issue link (rust-lang/cargo#15371)
- fix(tree): Make output more deterministic (rust-lang/cargo#15369)
- feat: rustdoc depinfo rebuild detection via -Zrustdoc-depinfo (rust-lang/cargo#15359)
- Rename the gc config table (rust-lang/cargo#15367)
- Revert "Temporarily ignore cargo_test_doctest_xcompile_ignores" (rust-lang/cargo#15357)
- Don't canonicalize executable path in `cargo_exe` (rust-lang/cargo#15355)

r? ghost
2025-04-06 13:23:48 +00:00
Levi Zim
49ea23232c
Fix deadlink in libs-and-metadata.md 2025-04-06 20:05:03 +08:00
Stuart Cook
f55034b2eb
Rollup merge of #139347 - jieyouxu:rust_test_helpers, r=onur-ozkan
Only build `rust_test_helpers` for `{incremental,ui}` test suites

Only build `rust_test_helpers` for `{incremental,ui}` test suites.

Context: Trying to see what test suites actually need `rust_test_helpers`, because this was causing unnecessary local failures when trying to run `./x test tests/run-make --target=wasm32-unknown-unknown` when `run-make` tests don't need `rust_test_helpers` at all.

r? `@ghost`

try-job: armhf-gnu
try-job: test-various
try-job: x86_64-apple-1
try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: i686-mingw-1
2025-04-06 16:21:02 +10:00
Stuart Cook
fededb9906
Rollup merge of #139123 - thaliaarchi:core-alloc-test-paths, r=bjorn3
tidy: Fix paths to `coretests` and `alloctests`

Following `#135937` and `#136642`, tests for core and alloc are in coretests and alloctests. Fix tidy to lint for the new paths. Also, update comments referring to the old locations.

Some context for changes which don't match that pattern:
- `library/std/src/thread/local/dynamic_tests.rs` and `library/std/src/sync/mpsc/sync_tests.rs` were moved under `library/std/tests/` in 332fb7e6f1 (Move std::thread_local unit tests to integration tests, 2025-01-17) and b8ae372e48 (Move std::sync unit tests to integration tests, 2025-01-17), respectively, so are no longer special cases.
- There never was a `library/core/tests/fmt.rs` file. That comment previously referred to `src/test/ui/ifmt.rs`, which was folded into `library/alloc/tests/fmt.rs` in 949c96660c (move format! interface tests, 2020-09-08).

Now, the only matches for `(alloc|core)/tests` are in `compiler/rustc_codegen_{cranelift,gcc}/patches`. I don't know why CI hasn't broken because those patches can't apply. Or maybe they somehow still can apply?

r? `@bjorn3`
2025-04-06 16:21:02 +10:00
Weihang Lo
3034e571a4
Update cargo 2025-04-06 00:04:41 -04:00
Guillaume Gomez
d37bd4d7de Update proc-macro deps list 2025-04-06 03:08:16 +02:00
github-actions
d1eebd4b8c cargo update
compiler & tools dependencies:
     Locking 11 packages to latest compatible versions
    Updating blake3 v1.8.0 -> v1.8.1
    Updating ctrlc v3.4.5 -> v3.4.6
    Updating env_logger v0.11.7 -> v0.11.8
    Updating errno v0.3.10 -> v0.3.11
    Updating flate2 v1.1.0 -> v1.1.1
    Updating indexmap v2.8.0 -> v2.9.0
    Updating miniz_oxide v0.8.5 -> v0.8.7
    Updating openssl-sys v0.9.106 -> v0.9.107
    Updating redox_syscall v0.5.10 -> v0.5.11
    Updating smallvec v1.14.0 -> v1.15.0
    Updating tokio v1.44.1 -> v1.44.2
note: pass `--verbose` to see 40 unchanged dependencies behind latest

library dependencies:
     Locking 1 package to latest compatible version
    Updating miniz_oxide v0.8.5 -> v0.8.7
note: pass `--verbose` to see 4 unchanged dependencies behind latest

rustbook dependencies:
     Locking 30 packages to latest compatible versions
    Updating cc v1.2.17 -> v1.2.18
    Updating clap v4.5.32 -> v4.5.35
    Updating clap_builder v4.5.32 -> v4.5.35
    Updating darling v0.20.10 -> v0.20.11
    Updating darling_core v0.20.10 -> v0.20.11
    Updating darling_macro v0.20.10 -> v0.20.11
    Updating env_logger v0.11.7 -> v0.11.8
    Updating errno v0.3.10 -> v0.3.11
    Updating flate2 v1.1.0 -> v1.1.1
    Updating iana-time-zone v0.1.61 -> v0.1.63
    Updating icu_locid_transform_data v1.5.0 -> v1.5.1
    Updating icu_normalizer_data v1.5.0 -> v1.5.1
    Updating icu_properties_data v1.5.0 -> v1.5.1
    Updating indexmap v2.8.0 -> v2.9.0
    Updating log v0.4.26 -> v0.4.27
    Updating miniz_oxide v0.8.5 -> v0.8.7
    Updating once_cell v1.21.1 -> v1.21.3
    Updating pest v2.7.15 -> v2.8.0
    Updating pest_derive v2.7.15 -> v2.8.0
    Updating pest_generator v2.7.15 -> v2.8.0
    Updating pest_meta v2.7.15 -> v2.8.0
    Updating redox_syscall v0.5.10 -> v0.5.11
    Updating rustix v1.0.3 -> v1.0.5
    Updating smallvec v1.14.0 -> v1.15.0
    Updating string_cache v0.8.8 -> v0.8.9
    Updating windows-core v0.52.0 -> v0.61.0
      Adding windows-implement v0.60.0
      Adding windows-interface v0.59.1
      Adding windows-result v0.3.2
      Adding windows-strings v0.4.0
2025-04-06 00:23:40 +00:00
Guillaume Gomez
a6b7a26c3d Update rinja version in generate-copyright 2025-04-06 01:47:10 +02:00
Thalia Archibald
3af666ea91 tidy: Fix paths to coretests and alloctests
Following `#135937` and `#136642`, tests for core and alloc are in
coretests and alloctests. Fix tidy to lint for the new paths. Also,
update comments referring to the old locations.

Some context for changes which don't match that pattern:
* library/std/src/thread/local/dynamic_tests.rs and
  library/std/src/sync/mpsc/sync_tests.rs were moved under
  library/std/tests/ in 332fb7e6f1 (Move std::thread_local unit tests
  to integration tests, 2025-01-17) and b8ae372e48 (Move std::sync unit
  tests to integration tests, 2025-01-17), respectively, so are no
  longer special cases.
* There never was a library/core/tests/fmt.rs file. That comment
  previously referred to src/test/ui/ifmt.rs, which was folded into
  library/alloc/tests/fmt.rs in 949c96660c (move format! interface
  tests, 2020-09-08).
2025-04-05 12:15:49 -07:00
Josh Stone
12167d7064 Update the minimum external LLVM to 19 2025-04-05 11:44:38 -07:00
Guillaume Gomez
5797532940 Clean up rustc-literal-escaper usage in rust-analyzer 2025-04-05 20:06:52 +02:00
onur-ozkan
afe3834bce add change-entry
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-05 14:22:13 +03:00
onur-ozkan
17fad21702 utilize compiletest_use_stage0_libtest option
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-05 14:22:11 +03:00
onur-ozkan
86a7ee603c create new option build.compiletest-use-stage0-libtest
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-05 14:22:08 +03:00
Matthias Krüger
a64ccf4a46
Rollup merge of #139092 - thaliaarchi:move-fd-pal, r=joboet
Move `fd` into `std::sys`

Move platform definitions of `fd` into `std::sys`, as part of https://github.com/rust-lang/rust/issues/117276.

Unlike other modules directly under `std::sys`, this is only available on some platforms and I have not provided a fallback abstraction for unsupported platforms. That is similar to how `std::os::fd` is gated to only supported platforms.

Also, fix the `unsafe_op_in_unsafe_fn` lint, which was allowed for the Unix fd impl. Since macro expansions from `std::sys::pal::unix::weak` trigger this lint, fix it there too.

cc `@joboet,` `@ChrisDenton`

try-job: x86_64-gnu-aux
2025-04-05 10:18:04 +02:00
Thalia Archibald
4085af0183 Move fd into sys 2025-04-04 20:11:08 -07:00
Stuart Cook
f04c935cf1
Rollup merge of #139274 - lolbinarycat:rustdoc-js-less-expect-error-part5, r=notriddle
Rustdoc: typecheck settings.js

This makes the file fully typechecked with no instances of ``````@ts-expect-error`````` and no type casts.

r? `````@notriddle`````
2025-04-05 13:18:16 +11:00
Stuart Cook
a038028eca
Rollup merge of #138024 - reitermarkus:unicode-panic-optimization, r=ibraheemdev
Allow optimizing out `panic_bounds_check` in Unicode checks.

Allow optimizing out `panic_bounds_check` in Unicode checks.

For context, see https://github.com/japaric/ufmt/issues/52#issuecomment-2699207241.
2025-04-05 13:18:14 +11:00