Commit graph

161831 commits

Author SHA1 Message Date
bors
db074a06fe Auto merge of #140540 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2025-05-02 07:33:32 +00:00
Guillaume Gomez
d42e3ace2b
Rollup merge of #140556 - GuillaumeGomez:improve-rustdoc-gui-tool-error-output, r=clubby789
Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite

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

It now looks like this:

![Screenshot From 2025-05-01 17-41-12](https://github.com/user-attachments/assets/ae7f2b37-3619-47ff-941d-5d9a7cdd9b6b)

cc ``@kpreid``
2025-05-01 22:27:25 +02:00
Guillaume Gomez
786a53d2db
Rollup merge of #140538 - tshepang:rust-push, r=jieyouxu
rustc-dev-guide subtree update

r? ``@ghost``
2025-05-01 22:27:24 +02:00
Guillaume Gomez
96faee497a
Rollup merge of #140420 - fmease:rustdoc-fix-doctest-heur, r=GuillaumeGomez
rustdoc: Fix doctest heuristic for main fn wrapping

Fixes #140412 which regressed in #140220 that I reviewed. As mentioned in https://github.com/rust-lang/rust/pull/140220#issuecomment-2837061779, at the time I didn't have the time to re-review its latest changes and should've therefore invalided my previous "r=me" and blocked the PR on another review given the fragile nature of the doctest impl. This didn't happen which is my fault.

Contains some other small changes. Diff best reviewed modulo whitespace.
r? ``@GuillaumeGomez``
2025-05-01 22:27:23 +02:00
Guillaume Gomez
5a25a7a020
Rollup merge of #140034 - RalfJung:simd_select_bitmask-padding, r=workingjubilee
simd_select_bitmask: the 'padding' bits in the mask are just ignored

Fixes https://github.com/rust-lang/rust/issues/137942: we documented simd_select_bitmask to require the 'padding' bits in the mask (the mask can sometimes be longer than the vector; I am referring to these extra bits as 'padding' here)  to be zero, mostly because nobody felt like doing the research for what should be done when they are non-zero. However, codegen is already perfectly happy just ignoring them, so in practice they can have any value. Some of the intrinsic wrappers in stdarch have trouble ensuring that they are zero. So let's just adjust the docs and Miri to permit non-zero 'padding' bits.

Cc ````@Amanieu```` ````@workingjubilee````
2025-05-01 22:27:22 +02:00
Guillaume Gomez
bc68d3a144 Improve error output in case nodejs or npm is not installed for rustdoc-gui test suite 2025-05-01 17:42:22 +02:00
León Orell Valerian Liehr
714ea10ea4
rustdoc: Fix doctest heuristic for main fn wrapping 2025-05-01 11:56:11 +02:00
Philipp Krones
c9992d6c54
Merge commit '03a5b6b976' into clippy-subtree-update 2025-05-01 10:22:55 +02:00
Tshepang Mbambo
bf06eaf7a2
Merge pull request #2367 from rust-lang/rustc-pull
Rustc pull update
2025-05-01 07:01:46 +02:00
Martin Ombura Jr.
9a3a212dae adds commas 2025-05-01 04:07:27 +00:00
The rustc-dev-guide Cronjob Bot
560de7e512 Merge from rustc 2025-05-01 04:05:49 +00:00
The rustc-dev-guide Cronjob Bot
27eb274233 Preparing for merge from rustc 2025-05-01 04:05:40 +00:00
Martin Ombura Jr.
3e0cbbb899 adds 'with' to help clarify how to build a new compiler 2025-05-01 04:01:42 +00:00
Matthias Krüger
5cb54f99b4
Rollup merge of #140486 - calebcartwright:rustfmt-let-chain-bool-lit, r=calebcartwright
rustfmt: Also allow bool literals as first item of let chain

This is a functional cherry-pick of https://github.com/rust-lang/rustfmt/pull/6492

I'm bringing this change over directly as the subtree sync is taking more effort than anticipated (some unrelated r-l/rustfmt changes need to be reverted before we perform the full sync) and we need to ensure that rustfmt behavior accounts with the final style guide rules as part of let chain stabilization.

r? ````@ghost````
2025-04-30 22:36:43 +02:00
Matthias Krüger
3b84630c19
Rollup merge of #140470 - ojeda:rfl, r=lqd
CI: rfl: move job forward to Linux v6.15-rc4

A hopefully routine upgrade to Linux v6.15-rc4!

r? `````@lqd````` `````@Kobzol`````
try-job: x86_64-rust-for-linux
`````@rustbot````` label A-rust-for-linux
`````@bors````` try
2025-04-30 22:36:41 +02:00
Matthias Krüger
f8f4d2d82a
Rollup merge of #140385 - lnicola:sync-from-ra, r=Veykril
Subtree update of `rust-analyzer`

r? ````@ghost````
2025-04-30 22:36:38 +02:00
Matthias Krüger
dab33f9085
Rollup merge of #140506 - tshepang:patch-1, r=jieyouxu
unstable-book: fix capitalization
2025-04-30 17:28:01 +02:00
bors
7188f45311 Auto merge of #140503 - matthiaskrgr:rollup-n7zigts, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - #136160 (Remove backticks from `ShouldPanic::YesWithMessage`'s `TrFailedMsg`)
 - #139059 (uses_power_alignment: wording tweaks)
 - #139192 (mention provenance in the pointer::wrapping_offset docs)
 - #140312 (Improve pretty-printing of braces)
 - #140404 (rm `TypeVistable` impls for `Canonical`)
 - #140437 (enable msa feature for mips in codegen tests)
 - #140438 (Add `rust.debug-assertions-tools` option)
 - #140439 (miri: algebraic intrinsics: bring back float non-determinism)
 - #140445 (Treat ManuallyDrop as ~const Destruct)
 - #140446 (chore: fix some tests)
 - #140448 (Rename `rustc_query_append!` to `rustc_with_all_queries!`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-30 12:09:10 +00:00
许杰友 Jieyou Xu (Joe)
b02178b1d4
Merge pull request #2352 from xizheyin/enable-behind-upstream 2025-04-30 18:42:23 +08:00
许杰友 Jieyou Xu (Joe)
b1c86935cd
Merge pull request #2359 from rust-lang/tshepang-repo-name 2025-04-30 18:41:49 +08:00
Tshepang Mbambo
0cb6f51a36
unstable-book: fix capitalization 2025-04-30 12:13:43 +02:00
Matthias Krüger
89ad574330
Rollup merge of #140446 - mejrs:test1, r=jieyouxu
chore: fix some tests
2025-04-30 10:18:29 +02:00
Matthias Krüger
254f050eb4
Rollup merge of #140439 - RalfJung:miri-algebraic-float-nondet, r=oli-obk
miri: algebraic intrinsics: bring back float non-determinism

Fixes https://github.com/rust-lang/miri/issues/4289
Cc ```@bjoernager```
r? ```@oli-obk```
2025-04-30 10:18:28 +02:00
Matthias Krüger
1267f0c07c
Rollup merge of #140438 - ferrocene:pa-debug-assertions-tools, r=Kobzol
Add `rust.debug-assertions-tools` option

Before this PR, the two only options to configure the presence of debug assertions were the `rust.debug-assertions` and `rust.debug-assertions-std` options. The former applied to everything, and the latter allowed to override the setting just for the standard library. This combination of settings doesn't allow to enable debug assertions for the std and the compiler but not tools.

Some tools (like Cargo) are not really meant to be executed with debug assertions enabled, and in Ferrocene we hit some debug assertions in it that are exclusively meant for its test suite. We'd thus like to enable debug assertions everywhere but in tools.

This PR adds a `rust.debug-assertions-tools` setting that does exactly this.
2025-04-30 10:18:27 +02:00
Vadim Petrochenkov
20faf8532b compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
Tshepang Mbambo
48bbf5a91b
for a more friendly output
Also, these are normal Rust things (crates/packages), so remove the word *normal*.
2025-04-29 23:39:06 +02:00
Tshepang Mbambo
029a2c4746
Merge pull request #2363 from smanilov/patch-1
Update compiler-src.md
2025-04-29 23:01:31 +02:00
Caleb Cartwright
04300d84bd Also allow bool literals as first item of let chain
Co-authored-by: est31 <est31@users.noreply.github.com>
2025-04-29 15:36:23 -05:00
Travis Cross
c7eeeb1263 Merge PR #2360: Add docs about stabilizing an edition 2025-04-29 19:09:46 +00:00
Boxy
7f1ae9b8c0 Fix footnotes 2025-04-29 19:35:26 +01:00
lcnr
fcec80ab24
Merge pull request #2266 from BoxyUwU/normalization
Introduce a normalization chapter
2025-04-29 20:19:27 +02:00
Boxy
e2fb99c97e Introduce a normalization chapter 2025-04-29 19:08:55 +01:00
Trevor Gross
f7110fa756
Rollup merge of #140392 - Zalathar:goodbye-libtest, r=jieyouxu
compiletest: Remove the libtest-based executor and its dependency

Now that #140288 has landed and the new compiletest executor is used by default, we can now move forward with removing the libtest dependency from compiletest.

My hope is that after landing this, we can configure bootstrap to build compiletest with the pre-built stage0 library by default, instead of the in-tree stage0 library. That would give the stage0 redesign one less thing to worry about.

---

This PR has deliberately been kept small and simple, to make it easier to revert if necessary. Further cleanup can take palce after we're confident that it won't need to be reverted.

r? jieyouxu

Blocker for https://github.com/rust-lang/rust/pull/119899
2025-04-29 12:28:23 -04:00
Trevor Gross
a20fe8ff23
Rollup merge of #139909 - oli-obk:or-patterns, r=BoxyUwU
implement or-patterns for pattern types

These are necessary to represent `NonZeroI32`, as the range for that is `..0 | 1..`. The `rustc_scalar_layout_range_*` attributes avoided this by just implementing wraparound and having a single `1..=-1` range effectively. See https://rust-lang.zulipchat.com/#narrow/channel/481660-t-lang.2Fpattern-types/topic/.60or.20pattern.60.20representation.20in.20type.20system/with/504217694 for some background discussion

cc https://github.com/rust-lang/rust/issues/123646

r? `@BoxyUwU`
2025-04-29 12:28:22 -04:00
Miguel Ojeda
6e26762224 CI: rfl: move job forward to Linux v6.15-rc4
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-04-29 17:40:17 +02:00
Stan Manilov
c466cd01d8
Update compiler-src.md
Refactor the dependency structure from a nested unordered list to a single-level ordered list.

IMO, this is clearer, but happy to close this PR without merging, if the change is not desired.
2025-04-29 16:39:54 +03:00
mejrs
a4ce307c01 Coalesce duplicate missing clone tests 2025-04-29 12:46:26 +02:00
Ralf Jung
2393e447eb miri: algebraic intrinsics: bring back float non-determinism 2025-04-29 11:05:06 +02:00
Pietro Albini
4fe94badef
add rust.debug-assertions-tools option 2025-04-29 11:05:06 +02:00
Ralf Jung
0917a07264 suppress dangerous_implicit_autorefs in TB test 2025-04-29 08:53:22 +02:00
The Miri Cronjob Bot
c2973c949d fmt 2025-04-29 06:25:01 +00:00
The Miri Cronjob Bot
55e2c01d9c Merge from rustc 2025-04-29 06:23:41 +00:00
The Miri Cronjob Bot
7953c9dda4 Preparing for merge from rustc 2025-04-29 06:16:28 +00:00
Chris Denton
ec2dad74a8
Rollup merge of #140394 - Kobzol:git-test-self-contained, r=jieyouxu
Make bootstrap git tests more self-contained

Based on https://stackoverflow.com/a/67512433/1107768.

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

r? ```@jieyouxu```
2025-04-28 23:29:18 +00:00
Chris Denton
8dd26cb195
Rollup merge of #140022 - dianne:box-deref-pats, r=Nadrieril
allow deref patterns to move out of boxes

This adds a case to lower deref patterns on boxes using a built-in deref instead of a `Deref::deref` or `DerefMut::deref_mut` call: if `deref!(inner): Box<T>` is matching on place `place`, the inner pattern `inner` now matches on `*place` rather than a temporary. No longer needing to call a method also means it won't borrow the scrutinee in match arms. This allows for bindings in `inner` to move out of `*place`.

For comparison with box patterns, this uses the same MIR lowering but different THIR. Consequently, deref patterns on boxes are treated the same as any other deref patterns in match exhaustiveness analysis. Box patterns can't quite be implemented in terms of deref patterns until exhaustiveness checking for deref patterns is implemented (I'll open a PR for exhaustiveness soon!).

Tracking issue: #87121

r? ``@Nadrieril``
2025-04-28 23:29:15 +00:00
Chris Denton
17495e0030
Rollup merge of #139656 - scottmcm:stabilize-slice-as-chunks, r=dtolnay
Stabilize `slice_as_chunks` library feature

~~Draft as this needs #139163 to land first.~~

FCP: https://github.com/rust-lang/rust/issues/74985#issuecomment-2769963395

Methods being stabilized are:
```rust
impl [T] {
    const fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T]);
    const fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]]);
    const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]];
    const fn as_chunks_mut<const N: usize>(&mut self) -> (&mut [[T; N]], &mut [T]);
    const fn as_rchunks_mut<const N: usize>(&mut self) -> (&mut [T], &mut [[T; N]]);
    const unsafe fn as_chunks_unchecked_mut<const N: usize>(&mut self) -> &mut [[T; N]];
}
```

~~(FCP's not done quite yet, but will in another day if I'm counting right.)~~ FCP Complete: https://github.com/rust-lang/rust/issues/74985#issuecomment-2797951535
2025-04-28 23:29:15 +00:00
Eric Huss
50500376b3 Add documentation on how to stabilize the compiler edition
This adds documentation on how to stabilize the edition in the compiler.
2025-04-28 14:53:36 -07:00
Eric Huss
0aae3caf24 Update mdbook to 0.4.48
This updates to the latest version of mdbook which has had a variety
of fixes of new features since the last update.

Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0448
2025-04-28 11:41:17 -07:00
Eric Huss
b0e675bc52 Add documentation on how to migration the edition of the standard library
Based on lessons learned from 2024. There's probably still more details
to say here since it was a ton of work. These are the major points that
I remember.
2025-04-28 11:30:33 -07:00
Eric Huss
3d23917b2d Add an example of the example of an edition migration lint
It was observed that some people were missing the `edition20xx` rustdoc
attribute. Although this probably won't solve that problem, I'd still
like to highlight it as something to be aware of.
2025-04-28 11:29:42 -07:00