about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-10-03Respect `--error-format` in `rustdoc --test`Urgau-0/+1
2025-10-03Respect `-Z` unstable options in `rustdoc --test`Urgau-0/+1
2025-09-13Rollup merge of #146389 - jdonszelmann:no-std, r=oli-obkJana Dönszelmann-8/+2
Convert `no_std` and `no_core` to the new attribute infrastructure r? ```@oli-obk``` Also added a test for these, since we didn't have any and I was kind of surprised new diagnostics didn't break anything hehe
2025-09-12Auto merge of #146444 - heiher:fix-loong-jemalloc-page-size, r=Mark-Simulacrumbors-11/+20
bootstrap: Build jemalloc for LoongArch with support for 16K pages By default, jemalloc is configured with a 4K page size. If the host’s page size is larger than this, it will crash at runtime. This patch raises the page size to 16K.
2025-09-12Rollup merge of #146449 - Kobzol:gcc-fix-symlink, r=GuillaumeGomezStuart Cook-1/+13
Fix `libgccjit` symlink when we build GCC locally Unblocks https://github.com/rust-lang/rust/pull/146414. r? ```@GuillaumeGomez```
2025-09-12Rollup merge of #146448 - GuillaumeGomez:fix-literal-search-paths, ↵Stuart Cook-2/+4
r=lolbinarycat [rustdoc] Correctly handle literal search on paths Fixes https://github.com/rust-lang/rust/issues/146129. cc ```@notriddle``` r? ```@lolbinarycat```
2025-09-12Rollup merge of #146435 - Kobzol:gcc-download-default-true, r=GuillaumeGomezStuart Cook-1/+10
Change the default value of `gcc.download-ci-gcc` to `true` It makes sense for the vast majority of uses (https://github.com/rust-lang/rustc-dev-guide/pull/2587#discussion_r2337374719). r? ```@GuillaumeGomez```
2025-09-12Rollup merge of #146413 - GuillaumeGomez:rustdoc-bare-urls, r=lolbinarycatStuart Cook-18/+39
Improve suggestion in case a bare URL is surrounded by brackets Fixes https://github.com/rust-lang/rust/issues/146162. With this change, output looks like this: ``` | 1 | //! [https://github.com] | ^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://github.com>` | = note: bare URLs are not automatically turned into clickable links = note: `#[warn(rustdoc::bare_urls)]` on by default ``` cc ```@fmease``` r? ```@lolbinarycat```
2025-09-12Rollup merge of #146332 - lolbinarycat:tidy-extra-checks-regularize, r=KobzolStuart Cook-13/+45
tidy: make behavior of extra-checks more uniform
2025-09-12Rollup merge of #145895 - RalfJung:unpark, r=joboetStuart Cook-0/+1
thread parking: fix docs and examples Fixes https://github.com/rust-lang/rust/issues/145816 r? ```@joboet``` Cc ```@m-ou-se``` ```@Amanieu```
2025-09-11Auto merge of #145177 - joboet:move-pal-thread, r=ibraheemdevbors-24/+24
std: move `thread` into `sys` Part of https://github.com/rust-lang/rust/issues/117276.
2025-09-11Auto merge of #146386 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo submodule 13 commits in 761c4658d0079d607e6d33cf0c060e61a617cad3..24bb93c388fb8c211a37986539f24a819dc669d3 2025-09-04 01:25:01 +0000 to 2025-09-10 23:16:07 +0000 - Bump miow to 0.60.1 (rust-lang/cargo#15950) - test(help): Ensure consistent behavior regardless of rustup use (rust-lang/cargo#15949) - docs(changelog): Clarify how manifest paths are used (rust-lang/cargo#15946) - fix(flock): check if they are marked unsupported in libstd (rust-lang/cargo#15941) - test(manifest): Fix test output order (rust-lang/cargo#15940) - refactor(shell): Simplify some code (rust-lang/cargo#15937) - fix(manifest): Report script manifest errors for the right line number (rust-lang/cargo#15927) - refactor: replace flock with std flock (rust-lang/cargo#15935) - fix(cli): Adjust messages to match rustc (rust-lang/cargo#15928) - fix: Switch from --nocapture to --no-capture (rust-lang/cargo#15930) - Render individual compilation sections in `--timings` pipeline graph (rust-lang/cargo#15923) - test(credential): Switch more expected results to snapshots (rust-lang/cargo#15929) - refactor(cli): Pull out error chain iteration (rust-lang/cargo#15926)
2025-09-11Fix `libgccjit` symlink when we build GCC locallyJakub Beránek-1/+13
2025-09-11Correctly handle literal search on pathsGuillaume Gomez-2/+4
2025-09-11bootstrap: Build jemalloc for LoongArch with support for 16K pagesWANG Rui-11/+20
By default, jemalloc is configured with a 4K page size. If the host’s page size is larger than this, it will crash at runtime. This patch raises the page size to 16K.
2025-09-11Update cargo submoduleWeihang Lo-0/+0
2025-09-11Change the default value of `gcc.download-ci-gcc` to `true`Jakub Beránek-1/+10
2025-09-11Auto merge of #146429 - Zalathar:rollup-eivhl6u, r=Zalatharbors-24/+20
Rollup of 11 pull requests Successful merges: - rust-lang/rust#142315 (core::ptr: deduplicate docs for as_ref, addr, and as_uninit_ref) - rust-lang/rust#146335 (disable core dumps for panic-uninitialized-zeroed) - rust-lang/rust#146347 (report duplicate symbols added by the driver) - rust-lang/rust#146370 (Update the LoongArch target documentation) - rust-lang/rust#146379 (Fix `compare_against_sw_vers` test) - rust-lang/rust#146380 (Unify and deduplicate bits conv float tests) - rust-lang/rust#146415 (s390x: mark soft-float target feature as incompatible) - rust-lang/rust#146422 (Less greedily parse `[const]` bounds) - rust-lang/rust#146424 (Improve `core::ops` coverage) - rust-lang/rust#146425 (Improve `core::array` coverage) - rust-lang/rust#146428 (Revert `assert!` desugaring changes (rust-lang/rust#122661)) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-11Auto merge of #146400 - nikic:llvm-21.1.1, r=dianqkbors-0/+0
Update to LLVM 21.1.1 Fixes https://github.com/rust-lang/rust/issues/145988. Fixes https://github.com/rust-lang/rust/issues/146163.
2025-09-11Rollup merge of #146428 - jieyouxu:revert-assert-desugaring, r=estebank,jackh726Stuart Cook-16/+9
Revert `assert!` desugaring changes (#122661) Reverts rust-lang/rust#122661 to prevent rust-lang/rust#145770 slipping into beta. cc `@estebank` (FYI) ### Review remarks - Commit 1 is the MCVE reported in rust-lang/rust#145770 added as a regression test `tests/ui/macros/assert-desugaring-145770.rs`. Against `master`, this test fails. - Commit 2 reverts rust-lang/rust#122661 (with a merge conflict fixed). `tests/ui/macros/assert-desugaring-145770.rs` now passes.
2025-09-11Rollup merge of #146370 - heiher:update-loong-linux-docs, r=jieyouxuStuart Cook-8/+11
Update the LoongArch target documentation This patch defines minimum CPU feature requirements, updates toolchain baseline, and streamlines maintainer list: - Specify double-precision floating-point and LSX as mandatory CPU features - Raise the minimum required binutils version to 2.42+, due to relocations introduced by the default medium code model - Remove outdated maintainers to reduce irrelevant notifications r? `@jieyouxu`
2025-09-11Revert "Rollup merge of #122661 - estebank:assert-macro-span, r=petrochenkov"Jieyou Xu-16/+9
This reverts commit 1eeb8e8b151d1da7daa73837a25dc5f7a1a7fa28, reversing changes made to 324bf2b9fd8bf9661e7045c8a93f5ff0ec1a8ca5. Unfortunately the assert desugaring change is not backwards compatible, see RUST-145770. Code such as ```rust #[derive(Debug)] struct F { data: bool } impl std::ops::Not for F { type Output = bool; fn not(self) -> Self::Output { !self.data } } fn main() { let f = F { data: true }; assert!(f); } ``` would be broken by the assert desugaring change. We may need to land the change over an edition boundary, or limit the editions that the desugaring change impacts.
2025-09-10fixup no_{core,std} handling codeJana Dönszelmann-8/+2
2025-09-10Rollup merge of #146340 - fmease:frontmatter-containment, r=fee1-dead,UrgauMatthias Krüger-26/+44
Strip frontmatter in fewer places * Stop stripping frontmatter in `proc_macro::Literal::from_str` (RUST-146132) * Stop stripping frontmatter in expr-ctxt (but not item-ctxt!) `include`s (RUST-145945) * Stop stripping shebang (!) in `proc_macro::Literal::from_str` * Not a breaking change because it did compare spans already to ensure there wasn't extra whitespace or comments (`Literal::from_str("#!\n0")` already yields `Err(_)` thankfully!) * Stop stripping frontmatter+shebang inside some rustdoc code where it doesn't make any observable difference (see self review comments) * (Stop stripping frontmatter+shebang inside internal test code) Fixes https://github.com/rust-lang/rust/issues/145945. Fixes https://github.com/rust-lang/rust/issues/146132. r? fee1-dead
2025-09-10Simplify code for `find_raw_urls`Guillaume Gomez-17/+11
2025-09-10Improve suggestion in case a bare URL is surrounded by bracketsGuillaume Gomez-13/+40
2025-09-10bless miri testsjoboet-24/+24
2025-09-10Rollup merge of #146378 - alexcrichton:update-wasm-component-ld, r=lqdMatthias Krüger-1/+1
Update wasm-component-ld to 0.5.17 Keeping this up-to-date as the project itself, and its dependencies, are updated.
2025-09-10Rollup merge of #146368 - ojeda:rfl, r=lqdMatthias Krüger-3/+1
CI: rfl: move job forward to Linux v6.17-rc5 to remove temporary commits v6.17-rc5 contains the equivalent of the two commits we had here, thus move the Rust for Linux job forward to that so that we don't need the temporary commits anymore. r? ```@lqd``` ```@Kobzol``` try-job: x86_64-rust-for-linux ```@rustbot``` label A-rust-for-linux ```@bors``` try
2025-09-10Rollup merge of #146178 - folkertdev:static-align, ↵Matthias Krüger-0/+14
r=jdonszelmann,ralfjung,traviscross Implement `#[rustc_align_static(N)]` on `static`s Tracking issue: https://github.com/rust-lang/rust/issues/146177 ```rust #![feature(static_align)] #[rustc_align_static(64)] static SO_ALIGNED: u64 = 0; ``` We need a different attribute than `rustc_align` because unstable attributes are tied to their feature (we can't have two unstable features use the same unstable attribute). Otherwise this uses all of the same infrastructure as `#[rustc_align]`. r? `@traviscross`
2025-09-10Rollup merge of #144765 - Qelxiros:range-inclusive-last, r=jhprattMatthias Krüger-1/+0
inclusive `Range`s: change `end` to `last` Tracking issue: rust-lang/rust#125687 ACP: rust-lang/libs-team#511
2025-09-10Update to LLVM 21.1.1Nikita Popov-0/+0
2025-09-09allow `#[rustc_align_static(N)]` on `static`sFolkert de Vries-0/+14
We need a different attribute than `rustc_align` because unstable attributes are tied to their feature (we can't have two unstable features use the same unstable attribute). Otherwise this uses all of the same infrastructure as `#[rustc_align]`.
2025-09-09Auto merge of #146375 - matthiaskrgr:rollup-utik9zj, r=matthiaskrgrbors-2/+0
Rollup of 6 pull requests Successful merges: - rust-lang/rust#145463 (Reject invalid literal suffixes in tuple indexing, tuple struct indexing, and struct field name position) - rust-lang/rust#145929 (fix APITIT being treated as a normal generic parameter in suggestions) - rust-lang/rust#146001 (Update getopts to remove unicode-width dependency) - rust-lang/rust#146365 (triagebot: warn about #[rustc_intrinsic_const_stable_indirect]) - rust-lang/rust#146366 (add approx_delta to all gamma tests) - rust-lang/rust#146373 (fix comments about trait solver cycle heads) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-09Strip frontmatter in fewer placesLeón Orell Valerian Liehr-26/+44
2025-09-09Update wasm-component-ld to 0.5.17Alex Crichton-1/+1
Keeping this up-to-date as the project itself, and its dependencies, are updated.
2025-09-09Rollup merge of #146001 - bjorn3:update_getopts, r=davidtwcoMatthias Krüger-1/+0
Update getopts to remove unicode-width dependency Pulls in https://github.com/rust-lang/getopts/pull/133. This saves 1.5MB on the vendored size of the standard library.
2025-09-09Rollup merge of #145463 - jieyouxu:error-suffix, r=fmeaseMatthias Krüger-1/+0
Reject invalid literal suffixes in tuple indexing, tuple struct indexing, and struct field name position Tracking issue: rust-lang/rust#60210 Closes rust-lang/rust#60210 ## Summary Bump the ["suffixes on a tuple index are invalid" non-lint pseudo future-incompatibility warning (#60210)][issue-60210][^non-lint] to a **hard error** across all editions, rejecting the remaining carve outs from accidentally accepted invalid suffixes since Rust **1.27**. - We accidentally accepted invalid suffixes in tuple indexing positions in Rust **1.27**. Originally reported at https://github.com/rust-lang/rust/issues/59418. - We tried to hard reject all invalid suffixes in https://github.com/rust-lang/rust/pull/59421, but unfortunately it turns out there were proc macros accidentally relying on it: https://github.com/rust-lang/rust/issues/60138. - We temporarily accepted `{i,u}{32,size}` in https://github.com/rust-lang/rust/pull/60186 (the "*carve outs*") to mitigate *immediate* ecosystem impact, but it came with an FCW warning indicating that we wanted to reject it after a few Rust releases. - Now (1.89.0) is a few Rust releases later (1.35.0), thus I'm proposing to **also reject the carve outs**. - `std::mem::offset_of!` stabilized in Rust **1.77.0** happens to use the same "don't expect suffix" code path which has the carve outs, so it also accepted the carve out suffixes. I'm proposing to **reject this case as well**. ## What specifically breaks? Code that still relied on invalid `{i,u}{32,size}` suffixes being temporarily accepted by rust-lang/rust#60186 as an ecosystem impact mitigation measure (cf. rust-lang/rust#60138). Specifically, the following cases (particularly the construction of these forms in proc macros like reported in rust-lang/rust#60138): ### Position 1: Invalid `{i,u}{32,size}` suffixes in tuple indexing ```rs fn main() { let _x = (42,).0invalid; // Already error, already rejected by #59421 let _x = (42,).0i8; // Already error, not one of the #60186 carve outs. let _x = (42,).0usize; // warning: suffixes on a tuple index are invalid } ``` ### Position 2: Invalid `{i,u}{32,size}` suffixes in tuple struct indexing ```rs fn main() { struct X(i32); let _x = X(42); let _x = _x.0invalid; // Already error, already rejected by #59421 let _x = _x.0i8; // Already error, not one of the #60186 carve outs. let _x = _x.0usize; // warning: suffixes on a tuple index are invalid } ``` ### Position 3: Invalid `{i,u}{32,size}` suffixes in numeric struct field names ```rs fn main() { struct X(i32, i32, i32); let _x = X(1, 2, 3); let _y = X { 0usize: 42, 1: 42, 2: 42 }; // warning: suffixes on a tuple index are invalid match _x { X { 0usize: 1, 1: 2, 2: 3 } => todo!(), // warning: suffixes on a tuple index are invalid _ => {} } } ``` ### Position 4: Invalid `{i,u}{32,size}` suffixes in `std::mem::offset_of!` While investigating the warning, unfortunately I noticed `std::mem::offset_of!` also happens to use the "expect no suffix" code path which had the carve outs. So this was accepted since Rust **1.77.0** with the same FCW: ```rs fn main() { #[repr(C)] pub struct Struct<T>(u8, T); assert_eq!(std::mem::offset_of!(Struct<u32>, 0usize), 0); //~^ WARN suffixes on a tuple index are invalid } ``` ### The above forms in proc macros For instance, constructions like (see tracking issue rust-lang/rust#60210): ```rs let i = 0; quote! { foo.$i } ``` where the user needs to actually write ```rs let i = syn::Index::from(0); quote! { foo.$i } ``` ### Crater results Conducted a crater run (https://github.com/rust-lang/rust/pull/145463#issuecomment-3194920383). - https://github.com/AmlingPalantir/r4/tree/256af3c72f094b298cd442097ef7c571d8001f29: genuine regression; "invalid suffix `usize`" in derive macro. Has a ton of other build warnings, last updated 6 years ago. - Exactly the kind of intended breakage. Minimized down to https://github.com/AmlingPalantir/r4/blob/256af3c72f094b298cd442097ef7c571d8001f29/validates_derive/src/lib.rs#L71-L75, where when interpolation uses `quote`'s `ToTokens` on a `usize` index (i.e. on tuple struct `Tup(())`), the generated suffix becomes `.0usize` (cf. Position 2). - Notified crate author of breakage in https://github.com/AmlingPalantir/r4/issues/1. - Other failures are unrelated or spurious. ## Review remarks - Commits 1-3 expands the test coverage to better reflect the current situation before doing any functional changes. - Commit 4 is an intentional **breaking change**. We bump the non-lint "suffixes on a tuple index are invalid" warning into a hard error. Thus, this will need a crater run and a T-lang FCP. ## Tasks - [x] Run crater to check if anyone is still relying on this being not a hard error. Determine degree of ecosystem breakage. - [x] If degree of breakage seems acceptable, draft nomination report for T-lang for FCP. - [x] Determine hard error on Edition 2024+, or on all editions. ## Accompanying Reference update - https://github.com/rust-lang/reference/pull/1966 [^non-lint]: The FCW was implemented as a *non-lint* warning (meaning it has no associated lint name, and you can't `#![deny(..)]` it) because spans coming from proc macros could not be distinguished from regular field access. This warning was also intentionally impossible to silence. See https://github.com/rust-lang/rust/pull/60186#issuecomment-485581694. [issue-60210]: https://github.com/rust-lang/rust/issues/60210
2025-09-09Auto merge of #145717 - BoxyUwU:erase_regions_rename, r=lcnrbors-8/+8
rename erase_regions to erase_and_anonymize_regions I find it consistently confusing that `erase_regions` does more than replacing regions with `'erased`. it also makes some code look real goofy to be writing manual folders to erase regions with a comment saying "we cant use erase regions" :> or code that re-calls erase_regions on types with regions already erased just to anonymize all the bound regions. r? lcnr idk how i feel about the name being almost twice as long now
2025-09-09erase_regions to erase_and_anonymize_regionsBoxy-8/+8
2025-09-09Update the LoongArch target documentationWANG Rui-8/+11
This patch defines minimum CPU feature requirements, updates toolchain baseline, and streamlines maintainer list: - Specify double-precision floating-point and LSX as mandatory CPU features - Raise the minimum required binutils version to 2.42+, due to relocations introduced by the default medium code model - Remove outdated maintainers to reduce irrelevant notifications
2025-09-09Auto merge of #146360 - Zalathar:rollup-qc2hhrd, r=Zalatharbors-14/+24
Rollup of 11 pull requests Successful merges: - rust-lang/rust#139593 (add sitemap to rust docs) - rust-lang/rust#145819 (Port limit attributes to the new attribute parsing infrastructure) - rust-lang/rust#146025 (compiler: Include span of too huge array with `-Cdebuginfo=2`) - rust-lang/rust#146184 (In the rustc_llvm build script, don't consider arm64* to be 32-bit) - rust-lang/rust#146195 (fix partial urlencoded link support) - rust-lang/rust#146300 (Implement `Sum` and `Product` for `f16` and `f128`.) - rust-lang/rust#146314 (mark `format_args_nl!` as `#[doc(hidden)]`) - rust-lang/rust#146324 (const-eval: disable pointer fragment support) - rust-lang/rust#146326 (simplify the declaration of the legacy integer modules (`std::u32` etc.)) - rust-lang/rust#146339 (Update books) - rust-lang/rust#146343 (Weakly export `platform_version` symbols) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-09CI: rfl: move job forward to Linux v6.17-rc5 to remove temporary commitsMiguel Ojeda-3/+1
v6.17-rc5 contains the equivalent of the two commits we had here, thus move the Rust for Linux job forward to that so that we don't need the temporary commits anymore. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-09-09Rollup merge of #146339 - rustbot:docs-update, r=ehussStuart Cook-0/+0
Update books ## rust-lang/nomicon 1 commits in 57ed4473660565d9357fcae176b358d7e8724ebf..f17a018b9989430967d1c58e9a12c51169abc744 2025-09-05 22:46:58 UTC to 2025-09-05 22:46:58 UTC - Add missing "C" ABI to FFI example code (rust-lang/nomicon#501) ## rust-lang/reference 7 commits in 89f67b3c1b904cbcd9ed55e443d6fc67c8ca2769..b3ce60628c6f55ab8ff3dba9f3d20203df1c0dee 2025-09-05 20:14:36 UTC to 2025-08-26 20:17:24 UTC - Ensure all lexical elements are SCREAMING_CASE (rust-lang/reference#1990) - Link out to the notation from grammar summary (rust-lang/reference#1989) - Or-patterns are extending (rust-lang/reference#1975) - Specify lifetime extension of `match` arms and `if` consequent/`else` block tail expressions (rust-lang/reference#1981) - clean up and properly test temporary lifetime extension in doctests (rust-lang/reference#1979) - Update `cold` and `inline` to use the attribute template (rust-lang/reference#1907) - Pluralize "syntax diagrams" (rust-lang/reference#1977) ## rust-lang/rust-by-example 1 commits in ad27f82c18464525c761a4a8db2e01785da59e1f..dd26bc8e726dc2e73534c8972d4dccd1bed7495f 2025-09-04 22:33:29 UTC to 2025-09-04 22:33:29 UTC - Fix drop order explanation in trait > drop (rust-lang/rust-by-example#1953)
2025-09-09Rollup merge of #146314 - cyrgani:hide-fmt-args-nl, r=GuillaumeGomezStuart Cook-2/+1
mark `format_args_nl!` as `#[doc(hidden)]` The `#[unstable]` attribute of the macro already says: > `format_args_nl` is only for internal language use and is subject to change It does seem plausible to hide it from the `std` docs accordingly. The PR also removes the single usage of the macro outside of `std` as it does not seem like the macro is actually needed there.
2025-09-09Rollup merge of #146195 - nixxo:urlencoding-fix, r=ehussStuart Cook-12/+16
fix partial urlencoded link support Hello Rust community. This is my first contribution, hope is useful. While translating in Italian the rust book https://github.com/nixxo/rust-lang-book-it I noticed that the linkchecker tool was failing reporting broken links on some pages even if the link worked properly in the browser. Upon inspection I noticed that mdbook basically urlencoded the links, but not urlencoded the heading IDs resulting in a non-identical anchor/IDs pairing that linkchecker reports as non-valid. looking at the source code for the linkchecker tool I noticed that urlencoding was done by the `small_url_encode` function in a partial way, as the name suggests. Replacing this function with a full urlencoding fixes the issue and the links are properly reported as valid. - added full urlencoding to properly check urlencoded anchor links against non-urlencoded heading IDs - added tests urlecoding provided by https://crates.io/crates/urlencoding
2025-09-09Rollup merge of #139593 - lolbinarycat:sitemap, r=jieyouxuStuart Cook-0/+7
add sitemap to rust docs attempt to mitigate https://github.com/rust-lang/rust/issues/104670
2025-09-09Auto merge of #146018 - lambdageek:add-winres-version, r=wesleywiserbors-5/+5
compiler: Add Windows resources to rustc-main and rustc_driver Adds Windows resources with the rust version information to rustc-main.exe and rustc_driver.dll Invokes `rc.exe` directly, rather than using one of the crates from the ecosystem to avoid adding dependencies. A new internal `rustc_windows_rc` crate has the common build script machinery for locating `rc.exe` and constructing the resource script
2025-09-08change end to lastJeremy Smart-1/+0
2025-09-08fix partial urlencoded link supportnixxo-12/+16
- added full urlencoding to properly check urlencoded anchor links against non-urlencoded heading IDs - added tests urlecoding provided by https://crates.io/crates/urlencoding