about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
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-09Merge pull request #20639 from ChayimFriedman2/update-test-absDavid Barsky-23/+85
fix: Resolve paths to snapshot test libraries absolutely
2025-09-10Fix failing tests and fill-in missing detailsShoyu Vanilla-1428/+914
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-09WIP switch inference table to next-solverjackh726-526/+2292
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-09Make `#[target_feature]` safe always on WASMChayim Refael Friedman-11/+69
Even when the feature isn't enabled, as it's not UB to invoke an undefined feature in WASM (just a trap).
2025-09-09Expand target info to include the architectureChayim Refael Friedman-78/+188
And make it easier to expand it more in the future, if needed.
2025-09-09Resolve paths to snapshot test libraries absolutelyChayim Refael Friedman-23/+85
That is, resolve them globally, not from the test's location. This *should* result in more robust resolution; for example, previously the code failed to detect the presence of snapshot testing if the snapshot library was renamed in the dependency or was an indirect dependency.
2025-09-09Merge pull request #20624 from A4-Tacks/fix-syn-lifetime-boundsChayim Refael Friedman-7/+6
Fix LifetimeParam::lifetime_bounds invalid implement
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-09Fix LifetimeParam::lifetime_bounds invalid implementA4-Tacks-7/+6
Lifetime node example: ``` LIFETIME_PARAM@15..21 LIFETIME@15..17 LIFETIME_IDENT@15..17 "'a" COLON@17..18 ":" WHITESPACE@18..19 " " TYPE_BOUND_LIST@19..21 TYPE_BOUND@19..21 LIFETIME@19..21 LIFETIME_IDENT@19..21 "'b" ```
2025-09-09Add a FAQ entry about RA and Cargo interactionJakub Beránek-0/+9
2025-09-09Update documentation about how to build the RA bookJakub Beránek-0/+1
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-08Skip flycheck for workspace if it is already being checkedIfeanyi Orizu-9/+16
2025-09-08Merge pull request #20632 from rmehri01/navigation-on-primsChayim Refael Friedman-139/+244
feat: support navigation on primitives
2025-09-08make TryToNav take Semantics instead of RootDatabaseRyan Mehri-124/+203
2025-09-08add testRyan Mehri-0/+14
2025-09-08impl TryToNav for BuiltinType insteadRyan Mehri-30/+32
2025-09-08Merge pull request #20633 from Wilfred/improve_introChayim Refael Friedman-9/+29
Clarify intro in README and manual
2025-09-08Clarify intro in README and manualWilfred Hughes-9/+29
The first sentence a new user should see should ideally answer the questions: * What is rust-analyzer? * Why might I want to use it? The vast majority of users will be interested in using rust-analyzer inside their favourite editor. We should clarify that rust-analyzer is an LSP implementation and that it supports all the classic IDE features. Whilst it's also true that rust-analyzer is modular and organised into libraries, the first impression should (I think) focus on an overview and the primary use case.
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
2025-09-08Update booksrustbot-0/+0
2025-09-08feat: support navigation on primitivesRyan Mehri-17/+27
2025-09-08Remove support for register_attrWilfred Hughes-62/+14
This was removed in rustc in 2022: https://github.com/rust-lang/rust/pull/101123 Closes #20525.
2025-09-08Rollup merge of #146320 - tshepang:rdg-sync, r=tshepangMatthias Krüger-64/+186
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to https://github.com/rust-lang/rustc-dev-guide/commit/d03ffd422704a69078a26b57fecff058eb4161dd. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2025-09-08tidy extra checks: use Error::FailedCheck correctlybinarycat-3/+3
2025-09-08tidy extra checks that interact with --bless now all recommend using itbinarycat-6/+25
2025-09-08tidy: py:lint extra check now works with --blessbinarycat-2/+9
2025-09-08all tidy extra checks now print what they do in present tensebinarycat-2/+8
2025-09-08mark `format_args_nl!` as `#[doc(hidden)]`cyrgani-2/+1
2025-09-08move math foreign_items into their own fileRalf Jung-232/+266
2025-09-08extract core operation name instead of listing all function name variantsRalf Jung-17/+26
2025-09-08move math intrinsics to their own fileRalf Jung-287/+315
2025-09-08clippyRalf Jung-1/+1
2025-09-08Merge ref 'a09fbe2c8372' from rust-lang/rustRalf Jung-956/+1017
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: a09fbe2c8372643a27a8082236120f95ed4e6bba Filtered ref: e8da14f32630072c76aeb944454175f4d8266918 This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-08Prepare for merging from rust-lang/rustRalf Jung-1/+1
This updates the rust-version file to a09fbe2c8372643a27a8082236120f95ed4e6bba.
2025-09-08Fix broken Microsoft URL missing slashAli Nazzal-1/+1
2025-09-08Auto merge of #146173 - Kmeakin:km/unicode-data/no-ascii, r=jhprattbors-0/+5
Don't include ASCII characters in Unicode tables Split off from https://github.com/rust-lang/rust/pull/145219