Commit graph

163695 commits

Author SHA1 Message Date
Lukas Wirth
7e65c228f3 fix: Do not warn about proc-macro srv when sysroot is missing 2025-07-03 11:51:31 +02:00
Lukas Wirth
634dd221a8 Re-enable fixpoint iteration for variance computation 2025-07-03 10:48:09 +02:00
Lukas Wirth
898f265521 Bump salsa 2025-07-03 10:05:16 +02:00
Lukas Wirth
6dd8cfee3b
Merge pull request #20156 from Veykril/push-knkzxuxkzoyx
Restructure proc-macro loading erros, differentiate hard error property on kind
2025-07-03 07:40:17 +00:00
Lukas Wirth
adcb38cb18 Restructure proc-macro loading erros, differentiate hard error property on kind 2025-07-03 09:28:53 +02:00
Chayim Refael Friedman
51ef8fb35d Remove keyword prefixes (macro@ or macro ) from links in the docs only if the link target is inferred
That is, do it for `[macro foo]`, but not for `[macro foo](macro foo)`.
2025-07-03 00:41:47 +03:00
Hayashi Mikihiro
6f1369b771 Migrate wrap_unwrap_cfg_attr assist to use SyntaxEditor
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-02 01:18:22 +09:00
Hayashi Mikihiro
aed886c6f8 Migrate toggle_macro_delimiter assist to SyntaxEditor
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-01 22:40:31 +09:00
Hayashi Mikihiro
61825a6e1a Migrate promote_local_to_const Assist to SyntaxEditor
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-01 20:11:52 +09:00
Hayashi Mikihiro
64d3647d77 remove if-let chains
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-01 18:38:50 +09:00
Hayashi Mikihiro
6a52b3a6cf Migrate replace_is_method_with_if_let_method Assist to use SyntaxFactory
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-01 17:19:16 +09:00
Laurențiu Nicola
0edf5726c7 Merge from rust-lang/rust 2025-06-30 17:42:03 +03:00
Laurențiu Nicola
3b5b35052c Preparing for merge from rust-lang/rust 2025-06-30 17:41:18 +03:00
Oli Scherer
d0bb9a73aa Try increasing the repetition limit 2025-06-30 08:04:40 +00:00
zachs18
bc06bb193d
Remove last use of rustc_pat_analysis::Captures
It's not necessary anymore due to Rust 2024 lifetime capture rules.
2025-06-29 22:36:53 -05:00
bors
ed2d759783 Auto merge of #143137 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2025-06-29 16:04:05 +00:00
yukang
a203e4118e Remove unnecessary parens in closure 2025-06-29 19:28:48 +08:00
Guillaume Gomez
66ad1f2abf
Rollup merge of #142078 - sayantn:more-intrinsics, r=workingjubilee
Add SIMD funnel shift and round-to-even intrinsics

This PR adds 3 new SIMD intrinsics

 - `simd_funnel_shl` - funnel shift left
 - `simd_funnel_shr` - funnel shift right
 - `simd_round_ties_even` (vector version of `round_ties_even_fN`)

TODO (future PR): implement `simd_fsh{l,r}` in miri, cg_gcc and cg_clif (it is surprisingly hard to implement without branches, the common tricks that rotate uses doesn't work because we have 2 elements now. e.g, the `-n&31` trick used by cg_gcc to implement rotate doesn't work with this because then `fshl(a, b, 0)` will be `a | b`)

[#t-compiler > More SIMD intrinsics](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/More.20SIMD.20intrinsics/with/522130286)

`@rustbot` label T-compiler T-libs A-intrinsics F-core_intrinsics
r? `@workingjubilee`
2025-06-29 12:29:53 +02:00
Lukas Wirth
638329b86d
Merge pull request #20121 from Veykril/push-vkkuutpsuypq
Do not append `--compile-time-deps` to overwritten build script commands
2025-06-29 07:18:59 +00:00
Lukas Wirth
06097350c4 Do not append --compile-time-deps to overwritten build script commands 2025-06-29 09:07:55 +02:00
Ralf Jung
e56294060a disable ptrace codepath since it doesn't build on many targets 2025-06-29 07:12:13 +02:00
Ralf Jung
a317123ad0 fix miri build in bootstrap 2025-06-29 07:05:17 +02:00
Matthias Krüger
8dbc25ce9f
Rollup merge of #143155 - yotamofek:pr/rustdoc/housekeeping, r=GuillaumeGomez
`librustdoc` house-keeping 🧹

This PR mostly removes a bunch of crate-level attributes that were added at some point, but then later on became unnecessary:
- some `#[feature]` gates
- some `#[allow]`s
- a `#[recursion_limit]`

Then I went ahead and sprinkled some tidy sorting on the remaining attrs, and `Cargo.toml`.

Trying to give my anal retentiveness some peace of mind 😅
2025-06-29 06:59:32 +02:00
Matthias Krüger
c0e0528857
Rollup merge of #142021 - HamidrezaSK:fix-lint-precedence-doc, r=ehuss
Doc: clarify priority of lint level sources

This updates the rustc book to clearly document how conflicting lint configurations are resolved across different sources, including command-line flags, crate-level attributes, in-line attributes, and `--cap-lints`.

It also explains the special behavior of `forbid` and `force_warn`.

Fixes rust-lang/rust#124088
2025-06-29 06:59:27 +02:00
bors
8141c2265f Auto merge of #143160 - ehuss:update-cargo, r=ehuss
Update cargo

7 commits in 409fed7dc1553d49cb9a8c0637d12d65571346ce..930b4f62cfcd1f0eabdb30a56d91bf6844b739bf
2025-06-23 15:55:04 +0000 to 2025-06-28 14:58:43 +0000
- Use a different lint for the `fix_only_once_for_duplicates` test (rust-lang/cargo#15713)
- chore: bump to 0.91.0; update changelog (rust-lang/cargo#15710)
- Add `http.proxy-cainfo` config for proxy certs (rust-lang/cargo#15374)
- chore(deps): update msrv (3 versions) to v1.86 (rust-lang/cargo#15709)
- chore(deps): update msrv (1 version) to v1.88 (rust-lang/cargo#15706)
- Rework `cargo-test-support` & `testsuite` to use `CARGO_BIN_EXE_*` for Cargo (rust-lang/cargo#15692)
- fix: Expand error messages around path dependency on `cargo package` and `cargo publish` (rust-lang/cargo#15705)
2025-06-29 01:16:18 +00:00
Eric Huss
e0c8c3fbb0 Update cargo 2025-06-28 14:28:46 -07:00
Matthias Krüger
a62de822fa
Rollup merge of #143114 - leopardracer:master, r=RalfJung
Minor Documentation Improvements

---

## Description
- Fixed typos and improved clarity in comments and documentation.

---
2025-06-28 22:05:33 +02:00
Matthias Krüger
ac227500a2
Rollup merge of #143031 - mati865:push-mutywntmvomx, r=Mark-Simulacrum
Add windows-gnullvm hosts to the manifest

I made a mistake testing https://github.com/rust-lang/rust/pull/140772 only with `rustup-toolchain-install-master` which doesn't care about the manifests.

This means windows-gnullvm self-hosting will have to wait one more release, unless this change is backported to beta and a new beta release is made, which doesn't seem worth the trouble.
2025-06-28 22:05:30 +02:00
Matthias Krüger
8f30a98591
Rollup merge of #142987 - lolbinarycat:rustdoc-non_exhaustive-enum-v-142599, r=GuillaumeGomez
rustdoc: show attributes on enum variants

mostly for #[non_exhaustive]

unsure if there's any attributes we should take care to *not* include, it could use `render_code_attribute` and `is_non_exhaustive` instead, if that is a concern.

fixes rust-lang/rust#142599
2025-06-28 22:05:30 +02:00
Matthias Krüger
5e725a6367
Rollup merge of #142963 - Kobzol:try-build-skip, r=jieyouxu
Skip unnecessary components in x64 try builds

We unnecessarily rebuild `wasm-component-ld`, `llvm-bitcode-linker` and Cranelift during the intermediate PGO builds several times times, which is unnecessarily and increases the duration of try builds. This PR also disables some unnecessary dist components.

r? `````@jieyouxu`````
2025-06-28 22:05:29 +02:00
Yotam Ofek
581cb1100e librustdoc: use tidy for sorting attrs and deps 2025-06-28 19:25:35 +00:00
Yotam Ofek
96fcd06d41 librustdoc: remove unused feature gates 2025-06-28 19:20:49 +00:00
Yotam Ofek
bcb287dca5 librustdoc: remove unneeded #[recursion_limit] 2025-06-28 19:13:38 +00:00
Yotam Ofek
09e4ee5fbc librustdoc: remove unneeded #[allow]s 2025-06-28 19:13:25 +00:00
bors
b63223c152 Auto merge of #141759 - 1c3t3a:discriminants-query, r=saethlin
Insert checks for enum discriminants when debug assertions are enabled

Similar to the existing null-pointer and alignment checks, this checks for valid enum discriminants on creation of enums through unsafe transmutes. Essentially this sanitizes patterns like the following:
```rust
let val: MyEnum = unsafe { std::mem::transmute<u32, MyEnum>(42) };
```

An extension of this check will be done in a follow-up that explicitly sanitizes for extern enum values that come into Rust from e.g. C/C++.

This check is similar to Miri's capabilities of checking for valid construction of enum values.

This PR is inspired by saethlin@'s PR
https://github.com/rust-lang/rust/pull/104862. Thank you so much for keeping this code up and the detailed comments!

I also pair-programmed large parts of this together with vabr-g@.

r? `@saethlin`
2025-06-28 10:25:00 +00:00
Ralf Jung
5e14d0f193 move all the message types into one place 2025-06-28 11:55:46 +02:00
Ralf Jung
cde1012082 de-intend some code, and extend comments 2025-06-28 11:36:40 +02:00
Ralf Jung
62bb6216ea various minor native-lib-tracing tweaks, and disable naive-lib-tracing mode by default 2025-06-28 11:36:40 +02:00
Lukas Wirth
0f93d8ae88 ci: Fix up release workflow 2025-06-28 11:35:55 +02:00
Lukas Wirth
ea2e04236a ci: Cancel workflow only after the main matrix has finished 2025-06-28 09:28:26 +02:00
Ralf Jung
35e6def487 clippy 2025-06-28 09:12:51 +02:00
The Miri Cronjob Bot
cff5a7cb29 fmt 2025-06-28 05:03:27 +00:00
The Miri Cronjob Bot
3d8d4d4545 Merge from rustc 2025-06-28 05:02:19 +00:00
The Miri Cronjob Bot
34949e30d3 Preparing for merge from rustc 2025-06-28 04:55:04 +00:00
bors
d41e12f1f4 Auto merge of #143116 - matthiaskrgr:rollup-zy9ez06, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#139858 (New const traits syntax)
 - rust-lang/rust#140809 (Reduce special casing for the panic runtime)
 - rust-lang/rust#142730 (suggest declaring modules when file found but module not defined)
 - rust-lang/rust#142806 (Normalize before computing ConstArgHasType goal in new solver)
 - rust-lang/rust#143046 (const validation: properly ignore zero-sized UnsafeCell)
 - rust-lang/rust#143092 (const checks for lifetime-extended temporaries: avoid 'top-level scope' terminology)
 - rust-lang/rust#143096 (tag_for_variant: properly pass TypingEnv)
 - rust-lang/rust#143104 (hir_analysis: prohibit `dyn PointeeSized`)
 - rust-lang/rust#143106 (gce: don't ICE on non-local const)

Failed merges:

 - rust-lang/rust#143036 (Remove support for `dyn*` from the compiler)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-06-27 23:15:35 +00:00
Matthias Krüger
2d59c4e0fe
Rollup merge of #143046 - RalfJung:zst-unsafe-cell, r=lcnr,oli-obk
const validation: properly ignore zero-sized UnsafeCell

Fixes https://github.com/rust-lang/rust/issues/142948
r? `@oli-obk`
2025-06-27 22:13:05 +02:00
Matthias Krüger
9d15167921
Rollup merge of #140809 - bjorn3:panic_runtime_cleanup, r=petrochenkov
Reduce special casing for the panic runtime

See the individual commits for more info.
2025-06-27 22:13:01 +02:00
Matthias Krüger
36c2b011cb
Rollup merge of #139858 - oli-obk:new-const-traits-syntax, r=fee1-dead
New const traits syntax

This PR only affects the AST and doesn't actually change anything semantically.

All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser

Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error

r? ``@fee1-dead``

cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
2025-06-27 22:13:00 +02:00
bors
bdaba05a95 Auto merge of #143064 - flip1995:clippy-subtree-update, r=GuillaumeGomez
Clippy subtree update

r? `@Manishearth`

Cargo.lock update due to version bump
2025-06-27 20:07:50 +00:00
leopardracer
39092cc10b
Update dangling_pointer_to_raw_pointer.rs 2025-06-27 22:39:40 +03:00