about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-06-07intrinsics: use const generic to set atomic orderingRalf Jung-1469/+648
2025-06-07Auto merge of #141964 - sayantn:update-stdarch, r=Amanieubors-17/+9
Update stdarch submodule Updates the stdarch submodule. ## Merged PRs - rust-lang/stdarch#1797 - rust-lang/stdarch#1758 - rust-lang/stdarch#1798 - rust-lang/stdarch#1811 - rust-lang/stdarch#1810 - rust-lang/stdarch#1807 - rust-lang/stdarch#1806 - rust-lang/stdarch#1812 - rust-lang/stdarch#1795 - rust-lang/stdarch#1796 - rust-lang/stdarch#1813 - rust-lang/stdarch#1816 - rust-lang/stdarch#1818 - rust-lang/stdarch#1820 - rust-lang/stdarch#1819 r? `@Amanieu` `@rustbot` label T-libs-api Closes rust-lang/rust#111137
2025-06-07Auto merge of #141917 - petrochenkov:nobinroot, r=jieyouxubors-4/+2
bootstrap: Remove `rustc_snapshot_libdir` from PATH in one more place Same as https://github.com/rust-lang/rust/pull/141657 but in a different part of the build system, with the same goal of addressing [#t-infra/bootstrap > Build broken in MSYS2 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Build.20broken.20in.20MSYS2/near/520709527). It seems to work on windows-{gnu,msvc} and linux-gnu at least. r? jieyouxu
2025-06-07Auto merge of #142142 - jhpratt:rollup-frlezq2, r=jhprattbors-570/+815
Rollup of 8 pull requests Successful merges: - rust-lang/rust#137992 (Stabilise `os_string_pathbuf_leak`) - rust-lang/rust#141558 (Limit the size of cgu names when using the `-Zhuman-readable-cgu-name…) - rust-lang/rust#141797 (compiler: set Apple frame pointers by architecture) - rust-lang/rust#141857 (coretests: move float tests from num to floats module and use a more flexible macro to generate them) - rust-lang/rust#142045 (Make obligation cause code suggestions verbose) - rust-lang/rust#142076 (Check documentation of bootstrap in PR CI) - rust-lang/rust#142110 (Add solaris targets to build-manifest) - rust-lang/rust#142131 (Make cast suggestions verbose) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-07Rollup merge of #142131 - estebank:cast-sugg, r=UrgauJacob Pratt-115/+128
Make cast suggestions verbose ``` error[E0604]: only `u8` can be cast as `char`, not `u32` --> $DIR/E0604.rs:2:5 | LL | 1u32 as char; | ^^^^^^^^^^^^ invalid cast | help: try `char::from_u32` instead | LL - 1u32 as char; LL + char::from_u32(1u32); | ``` ``` error[E0620]: cast to unsized type: `&[u8]` as `[char]` --> $DIR/cast-to-slice.rs:6:5 | LL | arr as [char]; | ^^^^^^^^^^^^^ | help: try casting to a reference instead | LL | arr as &[char]; | + ``` ``` error[E0620]: cast to unsized type: `Box<{integer}>` as `dyn Send` --> $DIR/cast-to-unsized-trait-object-suggestion.rs:3:5 | LL | Box::new(1) as dyn Send; | ^^^^^^^^^^^^^^^^^^^^^^^ | help: you can cast to a `Box` instead | LL | Box::new(1) as Box<dyn Send>; | ++++ + ``` Part of rust-lang/rust#141973.
2025-06-07Rollup merge of #142110 - psumbera:solaris-ci-build4, r=marcoieniJacob Pratt-0/+2
Add solaris targets to build-manifest this is follow up for: https://github.com/rust-lang/rust/pull/138699
2025-06-07Rollup merge of #142076 - Kobzol:doc-bootstrap-ci, r=marcoieniJacob Pratt-0/+1
Check documentation of bootstrap in PR CI It's annoying when wrong doc comments in bootstrap [break](https://github.com/rust-lang/rust/pull/141272#issuecomment-2943614152) `auto` CI. This has happened a few times recently, and documenting bootstrap with the stage0 compiler should be pretty quick, so let's add it to PR CI. r? ``@marcoieni``
2025-06-07Rollup merge of #142045 - estebank:obligation-cause-code-suggestion, ↵Jacob Pratt-57/+80
r=compiler-errors Make obligation cause code suggestions verbose ``` error[E0277]: `()` is not a future --> $DIR/unnecessary-await.rs:28:10 | LL | e!().await; | ^^^^^ `()` is not a future | = help: the trait `Future` is not implemented for `()` = note: () must be a future or must implement `IntoFuture` to be awaited = note: required for `()` to implement `IntoFuture` help: remove the `.await` | LL - e!().await; LL + e!(); | ``` ``` error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/const-fn-in-vec.rs:1:47 | LL | static _MAYBE_STRINGS: [Option<String>; 5] = [None; 5]; | ^^^^ the trait `Copy` is not implemented for `String` | = note: required for `Option<String>` to implement `Copy` = note: the `Copy` trait is required because this value will be copied for each element of the array help: create an inline `const` block | LL | static _MAYBE_STRINGS: [Option<String>; 5] = [const { None }; 5]; | +++++++ + ``` Part of rust-lang/rust#141973
2025-06-07Rollup merge of #141857 - RalfJung:coretests-floats, r=tgross35Jacob Pratt-353/+548
coretests: move float tests from num to floats module and use a more flexible macro to generate them This makes some progress on https://github.com/rust-lang/rust/issues/141726 by moving the float tests in `num` to `floats` and using a newer, more flexible macro to generate them. We also newly run these tests on f16 and f128 in const, and at runtime in Miri and for hosts where that works well enough. I didn't yet deduplicate any tests or port the existing `floats::f*` tests to the macro, that can happen in a future PR. try-job: x86_64-gnu-aux
2025-06-07Rollup merge of #141797 - ↵Jacob Pratt-36/+23
workingjubilee:apple-likes-frame-pointers-but-not-that-much, r=madsmtm compiler: set Apple frame pointers by architecture All Apple targets stop overriding this configuration and instead use the default base of FramePointer::NonLeaf, which means some Apples will have less frame pointers in leaf functions. r? ``@madsmtm`` cc ``@thomcc``
2025-06-07Rollup merge of #141558 - Diggsey:db-limit-cgu-name-length, r=matthewjasperJacob Pratt-6/+31
Limit the size of cgu names when using the `-Zhuman-readable-cgu-name… …s` option Prior to this change, cgu names could be generated which would result in filenames longer than the limit imposed by the OS.
2025-06-07Rollup merge of #137992 - its-the-shrimp:stabilise_os_string_pathbuf_leak, ↵Jacob Pratt-3/+2
r=dtolnay Stabilise `os_string_pathbuf_leak` This PR stabilises `#[feature(os_string_pathbuf_leak)]`, which defines 2 new methods in the std: ```rs impl OsString { pub fn leak<'a>(self) -> &'a mut OsStr; } impl PathBuf { pub fn leak<'a>(self) -> &'a mut Path; } ``` ACP: https://github.com/rust-lang/libs-team/issues/389 Tracking issue: https://github.com/rust-lang/rust/issues/125965 Implementation: https://github.com/rust-lang/rust/pull/125966
2025-06-07Auto merge of #141910 - Kobzol:new-bors-try-branch-name-doc, r=marcoienibors-1/+2
Fix `create-docs-artifacts.sh` with new bors The slashes in the branch name (`automation/bors/try`) were causing issues for this script (https://github.com/rust-lang/rust/actions/runs/15391908130/job/43303193243). r? `@marcoieni` try-job: `mingw-check*`
2025-06-07Auto merge of #142133 - GuillaumeGomez:rollup-fvzdren, r=GuillaumeGomezbors-873/+552
Rollup of 11 pull requests Successful merges: - rust-lang/rust#140418 (Reexport types from `c_size_t` in `std`) - rust-lang/rust#141471 (unsafe keyword docs: emphasize that an unsafe fn in a trait does not get to choose its safety contract) - rust-lang/rust#141603 (Reduce `ast::ptr::P` to a typedef of `Box`) - rust-lang/rust#142043 (Verbose suggestion to make param `const`) - rust-lang/rust#142086 (duduplicate more AST visitor methods) - rust-lang/rust#142103 (Update `InterpCx::project_field` to take `FieldIdx`) - rust-lang/rust#142105 (remove extraneous text) - rust-lang/rust#142112 (fix typo) - rust-lang/rust#142113 (Reduce confusion of some drop order tests) - rust-lang/rust#142114 (Compute number of digits instead of relying on constant value for u128 display code) - rust-lang/rust#142118 (rustc_lexer: typo fix + small cleanups) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-06Rollup merge of #142118 - hkBst:lexer-patch1, r=oli-obkGuillaume Gomez-10/+8
rustc_lexer: typo fix + small cleanups
2025-06-06Rollup merge of #142114 - GuillaumeGomez:u128-const, r=UrgauGuillaume Gomez-2/+2
Compute number of digits instead of relying on constant value for u128 display code As discussed in https://github.com/rust-lang/rust/pull/142098/files#r2132084991, the code should reuse the same logic as the rest of file instead of using a constant value. r? `@tamird`
2025-06-06Rollup merge of #142113 - shepmaster:drop-order-test-confusion, r=jieyouxuGuillaume Gomez-29/+18
Reduce confusion of some drop order tests In addition to adhering to normal Rust casing idioms, I ran `rustfmt`. Closes rust-lang/rust#141604 r? `@jieyouxu`
2025-06-06Rollup merge of #142112 - ada4a:patch-1, r=wesleywiserGuillaume Gomez-1/+1
fix typo
2025-06-06Rollup merge of #142105 - tshepang:basic-usage, r=workingjubileeGuillaume Gomez-39/+0
remove extraneous text
2025-06-06Rollup merge of #142103 - scottmcm:fieldidx-in-interp, r=oli-obkGuillaume Gomez-80/+102
Update `InterpCx::project_field` to take `FieldIdx` As suggested by Ralf in https://github.com/rust-lang/rust/pull/142005#discussion_r2125839015
2025-06-06Rollup merge of #142086 - fee1-dead-contrib:ast-visitor-dedup, r=oli-obkGuillaume Gomez-397/+314
duduplicate more AST visitor methods r? oli-obk
2025-06-06Rollup merge of #142043 - estebank:const-suggestion, r=wesleywiserGuillaume Gomez-10/+22
Verbose suggestion to make param `const` ``` error[E0747]: type provided when a constant was expected --> $DIR/invalid-const-arguments.rs:10:19 | LL | impl<N> Foo for B<N> {} | ^ | help: consider changing this type parameter to a const parameter | LL - impl<N> Foo for B<N> {} LL + impl<const N: u8> Foo for B<N> {} | ``` Part of rust-lang/rust#141973.
2025-06-06Rollup merge of #141603 - nnethercote:reduce-P, r=fee1-deadGuillaume Gomez-289/+72
Reduce `ast::ptr::P` to a typedef of `Box` As per the MCP at https://github.com/rust-lang/compiler-team/issues/878. r? `@fee1-dead`
2025-06-06Rollup merge of #141471 - RalfJung:unsafe-fn-in-trait, r=traviscrossGuillaume Gomez-16/+11
unsafe keyword docs: emphasize that an unsafe fn in a trait does not get to choose its safety contract Inspired by discussion in https://github.com/rust-lang/rust/issues/139368. Cc `@hanna-kruppe`
2025-06-06Rollup merge of #140418 - tgross35:std-c-size_t, r=workingjubileeGuillaume Gomez-0/+2
Reexport types from `c_size_t` in `std` These are unstably available in `core` and should be in `std` too, but are not currently reexported. Resolve this here. Tracking issue: https://github.com/rust-lang/rust/issues/88345
2025-06-06Auto merge of #141800 - workingjubilee:build-std-with-less-leaf-pointers, ↵bors-1/+2
r=saethlin bootstrap: build std sans leaf frame pointers Sometimes leaf frame-pointers can impact LLVM inlining choices, and that can be a real problem for things like `mul_add`.
2025-06-06reword suggestion messageEsteban Küber-13/+16
2025-06-06unsafe keyword docs: emphasize that an unsafe fn in a trait does not get to ↵Ralf Jung-16/+11
choose its safety contract
2025-06-06Make obligation cause code suggestions verboseEsteban Küber-57/+80
``` error[E0277]: `()` is not a future --> $DIR/unnecessary-await.rs:28:10 | LL | e!().await; | ^^^^^ `()` is not a future | = help: the trait `Future` is not implemented for `()` = note: () must be a future or must implement `IntoFuture` to be awaited = note: required for `()` to implement `IntoFuture` help: remove the `.await` | LL - e!().await; LL + e!(); | ``` ``` error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/const-fn-in-vec.rs:1:47 | LL | static _MAYBE_STRINGS: [Option<String>; 5] = [None; 5]; | ^^^^ the trait `Copy` is not implemented for `String` | = note: required for `Option<String>` to implement `Copy` = note: the `Copy` trait is required because this value will be copied for each element of the array help: create an inline `const` block | LL | static _MAYBE_STRINGS: [Option<String>; 5] = [const { None }; 5]; | +++++++ + ```
2025-06-06Make cast suggestions verboseEsteban Küber-112/+122
``` error[E0604]: only `u8` can be cast as `char`, not `u32` --> $DIR/E0604.rs:2:5 | LL | 1u32 as char; | ^^^^^^^^^^^^ invalid cast | help: try `char::from_u32` instead | LL - 1u32 as char; LL + char::from_u32(1u32); | ``` ``` error[E0620]: cast to unsized type: `&[u8]` as `[char]` --> $DIR/cast-to-slice.rs:6:5 | LL | arr as [char]; | ^^^^^^^^^^^^^ | help: try casting to a reference instead | LL | arr as &[char]; | + ``` ``` error[E0620]: cast to unsized type: `Box<{integer}>` as `dyn Send` --> $DIR/cast-to-unsized-trait-object-suggestion.rs:3:5 | LL | Box::new(1) as dyn Send; | ^^^^^^^^^^^^^^^^^^^^^^^ | help: you can cast to a `Box` instead | LL | Box::new(1) as Box<dyn Send>; | ++++ + ```
2025-06-06Stabilised `os_string_pathbuf_leak`schvv31n-3/+2
2025-06-06Auto merge of #141774 - oli-obk:naked-fn-queries, r=petrochenkovbors-150/+105
Change per-module naked fn checks to happen during typeck instead cc `@Lokathor` `@Amanieu` `@folkertdev` just seems nicer this way
2025-06-06compiler: set Apple frame pointers by architectureJubilee Young-36/+23
Apple targets can now overriding this configuration and instead use the default based on their architecture, which means aarch64 targets now have less frame pointers in leaf functions.
2025-06-06Auto merge of #141681 - compiler-errors:fast-path-stalled, r=lcnrbors-6/+24
Fast path for stalled obligations on self ty If we see that the `self` type of a goal is an infer var, then don't try to compute the goal at all, since we know that it'll be forced ambiguous. This is currently only implemented when there are no opaques in the environment. We could extend it to check that the self type is not related to any already defined opaques via subtyping, but I'll leave that as a follow-up. --- Also stall coerce and subtype predicates if both of their vars are not resolved to concrete types. --- ~~Also, we don't care if the goal is higher-ranked for the sized and copy/clone fast path.~~ pulling this out into another PR. r? lcnr
2025-06-06rustc_lexer: typo fix + small cleanupsMarijn Schouten-10/+8
2025-06-06Reduce confusion of some drop order testsJake Goulding-29/+18
In addition to adhering to normal Rust casing idioms, I ran `rustfmt`.
2025-06-06Compute number of digits instead of relying on constant value for u128 ↵Guillaume Gomez-2/+2
display code
2025-06-06Auto merge of #142099 - matthiaskrgr:rollup-r9s3c35, r=matthiaskrgrbors-644/+651
Rollup of 11 pull requests Successful merges: - rust-lang/rust#125087 (Optimize `Seek::stream_len` impl for `File`) - rust-lang/rust#141982 (`tests/ui`: A New Order [5/N]) - rust-lang/rust#142012 (Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of None) - rust-lang/rust#142044 (compiler: Document the offset invariant of `OperandValue::Pair`) - rust-lang/rust#142047 (Ensure stack in two places that affect s390x) - rust-lang/rust#142058 (Clean `rustc_attr_parsing/src/lib.rs` documentation) - rust-lang/rust#142067 (canon_abi: make to_erased_extern_abi just a detail in formatting) - rust-lang/rust#142072 (doc: Fix inverted meaning in E0783.md) - rust-lang/rust#142084 (add myself to rotation) - rust-lang/rust#142091 (Fix AIX build) - rust-lang/rust#142092 (rustdoc: Support middle::ty associated const equality predicates again) Failed merges: - rust-lang/rust#142042 (Make E0621 missing lifetime suggestion verbose) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-06fix typoAda Alakbarova-1/+1
2025-06-06add solaris targets to build-manifestPetr Sumbera-0/+2
2025-06-06Update compiler/rustc_abi/src/layout/ty.rsscottmcm-1/+1
Co-authored-by: Ralf Jung <post@ralfj.de>
2025-06-06deduplicate more `walk_*` methods in AST visitDeadbeef-257/+188
2025-06-06remove extraneous textTshepang Mbambo-39/+0
"Basic usage" implies there is an example that shows advanced usage
2025-06-06Auto merge of #141272 - Shourya742:2025-05-18-modularize-config-module, r=Kobzolbors-1986/+2228
modularize the config module bootstrap Currently, our `config` module is quite large over 3,000 lines, and handles a wide range of responsibilities. This PR aims to break it down into smaller, more focused submodules to improve readability and maintainability: * **`toml`**: Introduces a dedicated `toml` submodule within the `config` module. Its sole purpose is to define configuration-related structs along with their corresponding deserialization logic. It also contains the `parse_inner` method, which serves as the central function for extracting relevant information from the TOML structs and constructing the final configuration. * **`rust`, `dist`, `install`, `llvm`, `build`, `gcc`, and others**: Each of these modules contains TOML subsections specific to their domain, along with the logic necessary to convert them into parts of the final configuration struct. * **`config/mod.rs`**: Contains shared types and enums used across multiple TOML subsections. * **`config/config.rs`**: Houses the logic that integrates all the TOML subsections into the complete configuration struct. r? `@kobzol`
2025-06-05Update `InterpCx::project_field` to take `FieldIdx`Scott McMurray-80/+102
As suggested by Ralf in 142005.
2025-06-06Rollup merge of #142092 - fmease:rustdoc-alias-terms, r=GuillaumeGomezMatthias Krüger-132/+106
rustdoc: Support middle::ty associated const equality predicates again Fix intentional regression from PR rust-lang/rust#125076. Fixes rust-lang/rust#125092. Fixes rust-lang/rust#134775. CC rust-lang/rust#141368 (`EqPredicates` and rustdoc).
2025-06-06Rollup merge of #142091 - thaliaarchi:aix-getenv, r=workingjubileeMatthias Krüger-1/+1
Fix AIX build Fix rust-lang/rust#141543. `getenv` was moved out of this file to `sys::env::getenv` in rust-lang/rust#140143. Replace its usage with `std::env::var_os`, the publicly exposed version. This matches the other usages of the same function in this file.
2025-06-06Rollup merge of #142084 - jdonszelmann:add-review-rotation, r=BoxyUwUMatthias Krüger-0/+1
add myself to rotation r? ``@BoxyUwU``
2025-06-06Rollup merge of #142072 - maflcko:patch-1, r=aDotInTheVoidMatthias Krüger-1/+1
doc: Fix inverted meaning in E0783.md `...` (three dots) was the old way of saying `..=`, which both denote the *inclusive* range, not the *exclusive* one.
2025-06-06Rollup merge of #142067 - RalfJung:abi-map-to-str, r=workingjubileeMatthias Krüger-13/+6
canon_abi: make to_erased_extern_abi just a detail in formatting I think ideally we'd avoid ever printing `CanonAbi` to users, but that needs further changes. Personally I think it's fine for Miri to use the debug printing of `CanonAbi` until we figure that out, but I think others disagree. ;) r? ``@workingjubilee``