about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-09-26Rollup merge of #146994 - cuviper:clippy-ci-recursion, r=KobzolMatthias Krüger-0/+2
Add `clippy::unconditional_recursion` to `./x clippy ci` The clippy lint catches some things that rustc's equivalent builtin lint does not, for example rust-lang/rust#146940: error: function cannot return without recursing --> library/std/src/path.rs:3428:5 | 3428 | / fn eq(&self, other: &String) -> bool { 3429 | | self == &*other 3430 | | } | |_____^ | note: recursive call site --> library/std/src/path.rs:3429:9 | 3429 | self == &*other | ^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion = note: requested on the command line with `-D clippy::unconditional-recursion`
2025-09-26Rollup merge of #146453 - thejpster:arm-linux-docs, r=petrochenkovMatthias Krüger-4/+234
Add general arm-linux.md platform doc. Adds a new page that covers all 32-bit Arm Linux systems. This means that we can reduce the amount of information required in the target specific pages to just the Tier level, the maintainer, and any specific details for that target. I have no changed those pages yet, though. Let's start with this.
2025-09-26Auto merge of #145882 - m-ou-se:format-args-extend-1-arg, r=petrochenkovbors-22/+38
Extended temporary argument to format_args!() in all cases Fixes https://github.com/rust-lang/rust/issues/145880 by removing the special case.
2025-09-25rustdoc-search: add descriptive comment to space-saving hackMichael Howell-0/+8
2025-09-25rustdoc: put the toolbar on the all item indexMichael Howell-3/+13
2025-09-25fix transcriber error in declarative macros for negative integer literal ↵Oblarg-1/+110
const generic params
2025-09-25rustdoc-search: use the same ID for entry and path to same itemMichael Howell-8/+24
This decreases the size of the compiler-doc from 57MiB to 56MiB.
2025-09-25Auto merge of #147037 - matthiaskrgr:rollup-xtgqzuu, r=matthiaskrgrbors-346/+431
Rollup of 8 pull requests Successful merges: - rust-lang/rust#116882 (rustdoc: hide `#[repr]` if it isn't part of the public ABI) - rust-lang/rust#135771 ([rustdoc] Add support for associated items in "jump to def" feature) - rust-lang/rust#141032 (avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`) - rust-lang/rust#142401 (Add proper name mangling for pattern types) - rust-lang/rust#146293 (feat: non-panicking `Vec::try_remove`) - rust-lang/rust#146859 (BTreeMap: Don't leak allocators when initializing nodes) - rust-lang/rust#146924 (Add doc for `NonZero*` const creation) - rust-lang/rust#146933 (Make `render_example_with_highlighting` return an `impl fmt::Display`) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-25resolve: Do not finalize shadowed bindingsVadim Petrochenkov-7/+4
I.e. do not mark them as used, or non-speculative loaded, or similar. Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
2025-09-25Add `clippy::unconditional_recursion` to `./x clippy ci`Josh Stone-0/+2
The clippy lint catches some things that rustc's equivalent builtin lint does not, for example rust-lang/rust#146940: error: function cannot return without recursing --> library/std/src/path.rs:3428:5 | 3428 | / fn eq(&self, other: &String) -> bool { 3429 | | self == &*other 3430 | | } | |_____^ | note: recursive call site --> library/std/src/path.rs:3429:9 | 3429 | self == &*other | ^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion = note: requested on the command line with `-D clippy::unconditional-recursion`
2025-09-25Rename `verbose` to `do_if_verbose`Jakub Beránek-37/+40
2025-09-25Rollup merge of #146933 - yotamofek:pr/rustdoc/highlight_no_write_str, ↵Matthias Krüger-95/+80
r=GuillaumeGomez Make `render_example_with_highlighting` return an `impl fmt::Display` Removes some more usages of `write_str`. Shouldn't affect runtime, but makes the codebase a bit more consistent. Each commit can be reviewed separately
2025-09-25Rollup merge of #142401 - oli-obk:pattern-mango, r=petrochenkovMatthias Krüger-0/+28
Add proper name mangling for pattern types requires adding demangler support first https://github.com/rust-lang/rustc-demangle/pull/81 needed for https://github.com/rust-lang/rust/pull/136006#discussion_r2139792593 as otherwise we will have symbol collisions
2025-09-25Rollup merge of #141032 - petrosagg:extract-if-ub, r=joboetMatthias Krüger-0/+10
avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if` The implementation of the `Vec::extract_if` iterator violates the safety contract adverized by `slice::from_raw_parts` by always constructing a mutable slice for the entire length of the vector even though that span of memory can contain holes from items already drained. The safety contract of `slice::from_raw_parts` requires that all elements must be properly initialized. As an example we can look at the following code: ```rust let mut v = vec![Box::new(0u64), Box::new(1u64)]; for item in v.extract_if(.., |x| **x == 0) { drop(item); } ``` In the second iteration a `&mut [Box<u64>]` slice of length 2 will be constructed. The first slot of the slice contains the bitpattern of an already deallocated box, which is invalid. This fixes the issue by only creating references to valid items and using pointer manipulation for the rest. I have also taken the liberty to remove the big `unsafe` blocks in place of targetted ones with a SAFETY comment. The approach closely mirrors the implementation of `Vec::retain_mut`. **Note to reviewers:** The diff is easier to follow with whitespace hidden.
2025-09-25Rollup merge of #135771 - GuillaumeGomez:jump-to-def-perf, r=fmeaseMatthias Krüger-92/+152
[rustdoc] Add support for associated items in "jump to def" feature Fixes https://github.com/rust-lang/rust/issues/135485. r? ``@fmease``
2025-09-25Rollup merge of #116882 - fmease:rustdoc-generalized-priv-repr-heuristic, ↵Matthias Krüger-159/+161
r=rustdoc rustdoc: hide `#[repr]` if it isn't part of the public ABI > [!IMPORTANT] > Temporarily stacked on top of PR https://github.com/rust-lang/rust/pull/146527; only the last commit is relevant! Follow-up to rust-lang/rust#115439. Unblocks rust-lang/rust#116743, CC ``@dtolnay.`` Fixes rust-lang/rust#66401. Fixes rust-lang/rust#128364. Fixes rust-lang/rust#137440. Only display the representation `#[repr(REPR)]` (where `REPR` is not `Rust` or `transparent`) of a given type if none of its variants (incl. the synthetic variants of structs) are `#[doc(hidden)]` and all of its fields are public and not `#[doc(hidden)]` since it's likely not meant to be considered part of the public ABI otherwise. `--document-{private,hidden}-items` works as expected in this context, too. Moreover, we now also factor in the presence of `#[doc(hidden)]` when checking whether to show `repr(transparent)` or not.
2025-09-25Remove `is_verbose_than` functionJakub Beránek-6/+1
2025-09-25Remove `verbose_than` functionJakub Beránek-15/+5
2025-09-25Make `cargo test` work againJakub Beránek-8/+30
2025-09-25Correctly display merged doctest compilation timeGuillaume Gomez-3/+7
2025-09-25Add applicable in closure for convert_to_guarded_returnA4-Tacks-5/+49
Example --- ```rust fn main() { let _f = || { bar(); if$0 true { foo(); // comment bar(); } } } ``` -> ```rust fn main() { let _f = || { bar(); if false { return; } foo(); // comment bar(); } } ```
2025-09-25Fix not applicable for if-expr in let-stmtA4-Tacks-6/+28
Example --- ```rust fn main() { let _x = loop { if$0 let Ok(x) = Err(92) { foo(x); } }; } ``` **Before**: Assist not applicable **After**: ```rust fn main() { let _x = loop { let Ok(x) = Err(92) else { continue }; foo(x); }; } ```
2025-09-25Ensure that `--build-dir` is always specified in testsJakub Beránek-23/+4
2025-09-25Add let-chain support for convert_to_guarded_returnA4-Tacks-38/+179
- And add early expression `None` in function `Option` return Example --- ```rust fn main() { if$0 let Ok(x) = Err(92) && x < 30 && let Some(y) = Some(8) { foo(x, y); } } ``` -> ```rust fn main() { let Ok(x) = Err(92) else { return }; if x >= 30 { return; } let Some(y) = Some(8) else { return }; foo(x, y); } ```
2025-09-25Fix fixes for unused raw variablesA4-Tacks-2/+16
Example --- ``` fn main() { let $0r#type = 2; } ``` **Before this PR**: ```rust fn main() { let _r#type = 2; } ``` **After this PR**: ```rust fn main() { let _type = 2; } ```
2025-09-25Rollup merge of #147013 - fmease:fix-docs-doctest-build-arg, r=GuillaumeGomezStuart Cook-21/+5
rustdoc: Fix documentation for `--doctest-build-arg` In https://github.com/rust-lang/rust/pull/139863, I forgot to update the documentation. Tracking issue: https://github.com/rust-lang/rust/issues/134172
2025-09-25Rollup merge of #147008 - neuschaefer:bootstrap-jobs, r=KobzolStuart Cook-0/+2
bootstrap.py: Respect build.jobs while building bootstrap tool On resource-constrained systems, it is vital to respect the value of build.jobs, in order to avoid overwhelming the available memory.
2025-09-25Rollup merge of #146735 - Qelxiros:const_mul_add, r=tgross35,RalfJungStuart Cook-41/+5
unstably constify float mul_add methods Tracking issue: rust-lang/rust#146724 r? `@tgross35`
2025-09-25Rollup merge of #146667 - calebzulawski:simd-mono-lane-limit, r=lcnr,RalfJungStuart Cook-0/+5
Add an attribute to check the number of lanes in a SIMD vector after monomorphization Allows std::simd to drop the `LaneCount<N>: SupportedLaneCount` trait and maintain good error messages. Also, extends rust-lang/rust#145967 by including spans in layout errors for all ADTs. r? ``@RalfJung`` cc ``@workingjubilee`` ``@programmerjake``
2025-09-25Rollup merge of #145973 - vexide:vex-std, r=tgross35Stuart Cook-8/+19
Add `std` support for `armv7a-vex-v5` This PR adds standard library support for the VEX V5 Brain (`armv7a-vex-v5` target). It is more-or-less an updated version of the library-side work done in rust-lang/rust#131530. This was a joint effort between me, `@lewisfm,` `@max-niederman,` `@Gavin-Niederman` and several other members of the [`vexide` project](https://github.com/vexide/). ## Background VEXos is a fairly unconventional operating system, with user code running in a restricted enviornment with regards to I/O capabilities and whatnot. As such, several OS-dependent APIs are unsupported or have partial support (such as `std::net`, `std::process`, and most of `std::thread`). A more comprehensive list of what does or doesn't work is outlined in the [updated target documentation](https://github.com/vexide/rust/blob/vex-std/src/doc/rustc/src/platform-support/armv7a-vex-v5.md). Despite these limitations, we believe that `libstd` support on this target still has value to users, especially given the popular use of this hardware for educational purposes. For some previous discussion on this matter, see [this comment](https://github.com/rust-lang/rust/pull/131530#issuecomment-2432856841). ## SDK Linkage VEXos doesn't really ship with an official `libc` or POSIX-style platform API (and though it does port newlib, these are stubbed on top of the underlying SDK). Instead, VEX provides their own SDK for calling platform APIs. Their official SDK is kept proprietary (with public headers), though open-source implementations exist. Following the precedent of the `armv6k-nintendo-3ds` team's work in rust-lang/rust#95897, we've opted not to directly link `libstd` to any SDK with the expectation that users will provide their own with one of the following options: - [`vex-sdk-download`](https://github.com/vexide/vex-sdk/tree/main/packages/vex-sdk-download), which downloads an official proprietary SDK from VEX using a build script. - [`vex-sdk-jumptable`](https://crates.io/crates/vex-sdk-jumptable), which is a compatible, open-source reimplementation of the SDK using firmware jumps. - [`vex-sdk-pros`](https://github.com/vexide/vex-sdk/tree/main/packages/vex-sdk-pros), which uses the [PROS kernel](https://github.com/purduesigbots/pros) as a provider for SDK functions. - Linking their own implementation or stubbing the functions required by libstd. The `vex-sdk` crate used in the VEXos PAL provides `libc`-style FFI bindings for any compatible system library, so any of these options *should* work fine. A functional demo project using `vex-sdk-download` can be found [here](https://github.com/vexide/armv7a-vex-v5-demo/tree/main). ## Future Work This PR implements virtually everything we are currently able to implement given the current capabilities of the platform. The exception to this is file directory enumeration, though the implementation of that is sufficiently [gross enough](https://github.com/vexide/vexide/blob/c6c5bad11e035cf4e51d429dca7e427210185ed4/packages/vexide-core/src/fs/mod.rs#L987) to drive us away from supporting this officially. Additionally, I have a working branch implementing the `panic_unwind` runtime for this target, which is something that would be nice to see in the future, though given the volume of compiler changes i've deemed it out-of-scope for this PR.
2025-09-25Merge pull request #20738 from jackh726/next-trait-solver-next4Shoyu Vanilla (Flint)-127/+97
Remove non-ns version of impl_self_ty and impl_trait
2025-09-25Merge pull request #20735 from itsjunetime/fix_scip_salsaShoyu Vanilla (Flint)-1/+1
fix SCIP panicking due to salsa not attaching
2025-09-25bootstrap.py: Respect build.jobs while building bootstrap toolJ. Neuschäfer-0/+2
On resource-constrained systems, it is vital to respect the value of build.jobs, in order to avoid overwhelming the available memory.
2025-09-25rustdoc: hide `#[repr(...)]` if it isn't part of the public ABILeón Orell Valerian Liehr-26/+76
2025-09-25rustdoc: Fully escape link section and export nameLeón Orell Valerian Liehr-2/+2
Escape "special characters" (e.g., double quotes `"` and line breaks `\n`). Escape HTML. Lastly, add regression tests and clean up existing tests.
2025-09-25rustdoc: Slightly clean up attr renderingLeón Orell Valerian Liehr-97/+56
2025-09-25Install cargo for proc-macro-srv testsLaurențiu Nicola-2/+2
2025-09-25rustdoc: Fix documentation for `--doctest-build-arg`León Orell Valerian Liehr-21/+5
2025-09-25Auto merge of #146981 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo submodule 17 commits in 966f94733bbc94ca51ff9f1e4c49ad250ebbdc50..f2932725b045d361ff5f18ba02b1409dd1f44e71 2025-09-16 17:24:45 +0000 to 2025-09-24 11:31:26 +0000 - fix: use `host-tuple` for host target subsitution (rust-lang/cargo#16003) - test(build-std): move away from panic_immediate_abort (rust-lang/cargo#16006) - fix: Sparse URLs in `TomlLockfileSourceId` (rust-lang/cargo#15990) - refactor(gctx): extract toml dotted keys validation (rust-lang/cargo#15998) - feat: Add lint for global use of `hint-mostly-unused` (rust-lang/cargo#15995) - Make GlobalContext Sync (rust-lang/cargo#15967) - chore(deps): update cargo-semver-checks to v0.44.0 (rust-lang/cargo#15993) - fix(frontatter): Only allow horizontal whitespace after fences (rust-lang/cargo#15975) - docs: Add Lockfile schemas docs (rust-lang/cargo#15989) - Add parallel frontend to the build performance guide (rust-lang/cargo#15970) - chore(deps): update msrv (3 versions) to v1.88 (rust-lang/cargo#15988) - chore(deps): update msrv (1 version) to v1.90 (rust-lang/cargo#15984) - feat(cargo-util-schemas): Move lockfile schemas (rust-lang/cargo#15980) - Clarify multiple version requirement behavior (rust-lang/cargo#15979) - Adds ghostty as supported terminal for term integration (OSC 9;4) (rust-lang/cargo#15977) - docs(team): Fixed broken office hours link (rust-lang/cargo#15976) - docs: Clarify git sources vs git registries in source replacement documentation (rust-lang/cargo#15974) r? ghost
2025-09-25Also install rustfmt on stableLaurențiu Nicola-3/+3
2025-09-25Merge ref 'caccb4d0368b' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-20016/+43537
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: caccb4d0368bd918ef6668af8e13834d07040417 Filtered ref: 0f345ed05d559bbfb754f1403b16199366cda2e0 Upstream diff: https://github.com/rust-lang/rust/compare/21a19c297d4f5a03501d92ca251bd7a17073c08a...caccb4d0368bd918ef6668af8e13834d07040417 This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-25Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to caccb4d0368bd918ef6668af8e13834d07040417.
2025-09-24fix SCIP panicking due to salsa not attachingitsjunetime-1/+1
2025-09-24Make install test target independentJakub Beránek-55/+61
2025-09-24unstably constify float mul_add methodsJeremy Smart-41/+5
Co-authored-by: Ralf Jung <post@ralfj.de>
2025-09-24Rollup merge of #146969 - RalfJung:maybe-null-errors, r=oli-obkMatthias Krüger-1/+1
const-eval: better wording for errors involving maybe-null pointers Fixes https://github.com/rust-lang/rust/issues/146748 r? ``@oli-obk``
2025-09-24Rollup merge of #146932 - ShoyuVanilla:ra-in-tree-hack, r=lcnrMatthias Krüger-40/+5
Switch next-solver related rustc dependencies of r-a to crates.io ones r? ``@ghost`` cc ``@lnicola`` ``@lcnr``
2025-09-24Rollup merge of #146897 - lolbinarycat:rustdoc-invalid_html_tags-ice-146890, ↵Matthias Krüger-1/+2
r=GuillaumeGomez fix ICE in rustdoc::invalid_html_tags fixes https://github.com/rust-lang/rust/issues/146890 r? ```@GuillaumeGomez```
2025-09-24rustdoc-search: stringdex update with more packingMichael Howell-28/+52
Before: 18M build/x86_64-unknown-linux-gnu/doc/search.index/ 57M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/ After: 16M build/x86_64-unknown-linux-gnu/doc/search.index/ 49M build/x86_64-unknown-linux-gnu/compiler-doc/search.index/
2025-09-24Implement fallback properlyChayim Refael Friedman-230/+770
fallback.rs was ported straight from rustc (minus the lint parts). This fixes the `!` regressions.