about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-07-07Auto merge of #143582 - jieyouxu:rollup-8t9mhfj, r=jieyouxubors-1562/+2572
Rollup of 11 pull requests Successful merges: - rust-lang/rust#143130 (doc(std): clarify `NonZero<T>` usage limitation in doc comment) - rust-lang/rust#143415 (Get rid of build-powerpc64le-toolchain.sh) - rust-lang/rust#143464 (Make tests/ui/abi/debug.rs cross-compile) - rust-lang/rust#143482 (Fix short linker error output) - rust-lang/rust#143524 (Move `stable_mir` back to its own crate) - rust-lang/rust#143528 (interpret: rename StackPopCleanup) - rust-lang/rust#143551 (Dont resolve instance of root in `mir_callgraph_cyclic`) - rust-lang/rust#143558 (mbe: Refactors and function extractions in `compile_declarative_macro`) - rust-lang/rust#143563 (std: fix typo in `std::path`) - rust-lang/rust#143564 (compiler: Deduplicate `must_emit_unwind_tables()` comments) - rust-lang/rust#143577 (Disable download-rustc for library profile) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-07Rollup merge of #143577 - Noratrieb:Noratrieb-patch-4, r=Kobzol许杰友 Jieyou Xu (Joe)-1/+7
Disable download-rustc for library profile The feature currently completely breaks `x test` (rust-lang/rust#142505), core functionality of working on the standard library. Therefore it should be disabled by default until that problem is fixed. Having to wait a bit longer for a check build is nothing compared to completely mysterious build errors when testing.
2025-07-07Rollup merge of #143564 - Enselic:must_emit_unwind_tables-comment, r=oli-obk许杰友 Jieyou Xu (Joe)-17/+8
compiler: Deduplicate `must_emit_unwind_tables()` comments There is one comment at a call site and one comment in the function definition that are mostly saying the same thing. Fold the call site comment into the function definition comment to reduce duplication. There are actually some inaccuracies in the comments but let's deduplicate before we address the inaccuracies.
2025-07-07Rollup merge of #143563 - xizheyin:fix-typo, r=joshtriplett许杰友 Jieyou Xu (Joe)-2/+2
std: fix typo in `std::path` I noticed that most of the document used `'` instead of `’`, so I adjusted it. r? `@ibraheemdev`
2025-07-07Rollup merge of #143558 - joshtriplett:mbe-refactors, r=SparrowLii许杰友 Jieyou Xu (Joe)-23/+27
mbe: Refactors and function extractions in `compile_declarative_macro` These refactors help pave the way for parsing attribute rules. Best reviewed commit-by-commit. - **mbe: Simplify compile_declarative_macro by factoring out some variables** - **mbe: Factor out a helper to check an LHS** - **mbe: Factor out a helper to check for unexpected EOF in definition** - **mbe: Clarify comments about error handling in `compile_declarative_macro`**
2025-07-07Rollup merge of #143551 - compiler-errors:root-sub, r=cjgillot许杰友 Jieyou Xu (Joe)-9/+129
Dont resolve instance of root in `mir_callgraph_cyclic` `Instance::try_resolve` on a default trait body method will always fail, since it's still possible to further substitute. This leads to a cycle, since in `tests/mir-opt/inline_default_trait_body.rs`, both `Trait::a` and `Trait::b` need to consider the other to be cyclical, but since we couldn't resolve a body, we'd just consider *nothing* to be cyclical. The root instance we care about when computing `mir_callgraph_cyclic` is trivial to compute (it's just `InstanceKind::Item`), so just replace it with a call to `Instance::new_raw`. r? `@cjgillot` `@oli-obk` Fixes rust-lang/rust#143534
2025-07-07Rollup merge of #143528 - RalfJung:stack-pop-cleanup, r=oli-obk许杰友 Jieyou Xu (Joe)-56/+56
interpret: rename StackPopCleanup The name `StackPopCleanup` stopped making sense a long time ago IMO -- in the common case, it has nothing to do with "cleanup", and everything with where the program should jump next. If we didn't have unwinding this would be just the return block, but given that we do have unwinding I figured maybe "continuation" would be a good name. This comes up in [continuation-passing style](https://en.wikipedia.org/wiki/Continuation-passing_style) and refers to where the program will *continue* when a function is done. So from a PL perspective it is the most fitting term I think -- but it may be too jargony. r? `@oli-obk` what do you think?
2025-07-07Rollup merge of #143524 - makai410:smir-move-back, r=oli-obk许杰友 Jieyou Xu (Joe)-1344/+1284
Move `stable_mir` back to its own crate We've finished the refactoring, so it's time to move `stable_mir` back to its own crate. This PR leaves an empty `rustc_internal` module with a `#[deprecated]` attribute in `rustc_smir` to let users know we just moved it to `stable_mir`.
2025-07-07Rollup merge of #143482 - ia0:fix, r=fee1-dead许杰友 Jieyou Xu (Joe)-8/+36
Fix short linker error output This PR does 2 things: - It removes the braces when there's a single element. This is required since brace expansion (at least in bash and zsh) only triggers if there's at least 2 elements. - It removes the extra `.rlib` suffixes of the elements. See https://github.com/rust-lang/rust/pull/135707#discussion_r2185212393 for context. Running `cargo +stage1 build` on the following program: ```rust unsafe extern "C" { fn foo() -> libc::c_int; } fn main() { let x = unsafe { foo() } as u32; // println!("{}", data_encoding::BASE64.encode(&x.to_le_bytes())); } ``` Gives the following diff before and after the PR: ```diff -/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib}.rlib +/tmp/foo/target/debug/deps/liblibc-faf416f178830595.rlib ``` Running on the same program with the additional dependency, we get the following diff: ```diff -/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib,libdata_encoding-84bb5aadfa9e8839.rlib}.rlib +/tmp/foo/target/debug/deps/{liblibc-faf416f178830595,libdata_encoding-84bb5aadfa9e8839}.rlib ```
2025-07-07Rollup merge of #143464 - workingjubilee:make-debug-rs-cross-compile, r=oli-obk许杰友 Jieyou Xu (Joe)-12/+1007
Make tests/ui/abi/debug.rs cross-compile Resumption of rust-lang/rust#141979, making the test cross-compile.
2025-07-07Rollup merge of #143415 - Gelbpunkt:cleanup-dist-ppc64le-toolchain, r=marcoieni许杰友 Jieyou Xu (Joe)-90/+7
Get rid of build-powerpc64le-toolchain.sh The dist-powerpc64le-linux-musl runner never actually used the toolchain that the script produced, it instead used the one from crosstool-ng. The dist-powerpc64le-linux-gnu runner did use it, from what I can tell mainly to get a glibc 2.17 version with ppc64le support backported. Since crosstool-ng has the necessary patches, we can just use crosstool-ng to get an appropriate toolchain. While at it, use kernel 3.10 headers since that's the version documented in platform support for this target. try-job: dist-powerpc64le-linux-gnu try-job: dist-powerpc64le-linux-musl
2025-07-07Rollup merge of #143130 - xizheyin:142966, r=ibraheemdev许杰友 Jieyou Xu (Joe)-0/+9
doc(std): clarify `NonZero<T>` usage limitation in doc comment Closes rust-lang/rust#142966 This PR clarifies `NonZero<T>` usage limitation in doc comment and fixes a typo. r? libs
2025-07-07Add change tracker entry for disabling `download-rustc` temporarilyJieyou Xu-0/+5
2025-07-07Auto merge of #143035 - ywxt:less-work-steal, r=oli-obkbors-112/+309
Only work-steal in the main loop for rustc_thread_pool This PR is a replica of <https://github.com/rust-lang/rustc-rayon/pull/12> that only retained work-steal in the main loop for rustc_thread_pool. r? `@oli-obk` cc `@SparrowLii` `@Zoxc` `@cuviper` Updates rust-lang/rust#113349
2025-07-07Disable download-rustc for library profilenora-1/+2
The feature currently completely breaks `x test`, core functionality of working on the standard library. Therefore it should be disabled by default until that problem is fixed. Having to wait a bit longer for a check build is nothing compared to completely mysterious build errors when testing.
2025-07-07Auto merge of #143565 - lnicola:sync-from-ra, r=lnicolabors-668/+1281
Subtree update of `rust-analyzer` r? `@ghost`
2025-07-07compiler: Deduplicate `must_emit_unwind_tables()` commentsMartin Nordholts-16/+8
There is one comment at a call site and one comment in the function definition that are mostly saying the same thing. Fold the call site comment into the function definition comment to reduce duplication. There are actually some inaccuracies in the comments but let's deduplicate before we address the inaccuracies.
2025-07-07rustc_codegen_llvm: Remove reference to non-existing `no_landing_pads()`Martin Nordholts-6/+5
Removing this reference was forgotten in eb4725fc54056. Grepping for no_landing_pads returns no hits after this.
2025-07-07std: fix typo in `std::path`xizheyin-2/+2
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-07Reverse comparison orderJulien Cretin-1/+1
Co-authored-by: beef <ent3rm4n@gmail.com>
2025-07-07doc(std): clarify `NonZero<T>` usage limitation in doc commentxizheyin-0/+9
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-07Auto merge of #143048 - Kobzol:bootstrap-check-stage-1, r=jieyouxubors-284/+304
Enforce in bootstrap that check must have stage at least 1 This PR is another step towards https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Proposal.20to.20cleanup.20stages.20and.20steps.20after.20the.20redesign/with/523586917, this time dealing with `x check`. It enforces the invariant that: - We check std stage N with rustc stage N - We check everything else stage N with rustc stage N - 1 It creates a single function that prepares a proper build compiler for checking something, and also adds snapshot tests for various common check steps. Some obsolete code was also removed. The default check stage also becomes 1, for all profiles. I tested manually that `x check std` with `download-ci-rustc` still works and doesn't build rustc locally. Closes: https://github.com/rust-lang/rust/pull/139170 r? `@ghost`
2025-07-06mbe: Clarify comments about error handling in `compile_declarative_macro`Josh Triplett-3/+2
2025-07-06mbe: Factor out a helper to check for unexpected EOF in definitionJosh Triplett-7/+14
Will get called additional times when expanding parsing to cover attributes
2025-07-06mbe: Factor out a helper to check an LHSJosh Triplett-2/+7
This currently gets called only once, but will get called multiple times when handling attributes.
2025-07-06mbe: Simplify compile_declarative_macro by factoring out some variablesJosh Triplett-11/+4
2025-07-07remove `rustc_smir` from testsMakai-53/+43
2025-07-07Auto merge of #143556 - jhpratt:rollup-nid39y2, r=jhprattbors-272/+405
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143206 (Align attr fixes) - rust-lang/rust#143236 (Stabilize `mixed_integer_ops_unsigned_sub`) - rust-lang/rust#143344 (Port `#[path]` to the new attribute parsing infrastructure ) - rust-lang/rust#143359 (Link to 2024 edition page for `!` fallback changes) - rust-lang/rust#143456 (mbe: Change `unused_macro_rules` to a `DenseBitSet`) - rust-lang/rust#143529 (Renamed retain_mut to retain on LinkedList as mentioned in the ACP) - rust-lang/rust#143535 (Remove duplicate word) - rust-lang/rust#143544 (compiler: rename BareFn to FnPtr) - rust-lang/rust#143552 (lib: more eagerly return `self.len()` from `ceil_char_boundary`) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-07Rollup merge of #143552 - nagisa:makes-ceil-char-boundary-go-zoom, r=jhprattJacob Pratt-1/+1
lib: more eagerly return `self.len()` from `ceil_char_boundary` There is no reason to go through the complicated branch as it would always return `self.len()` in this case. Also helps debug code somewhat and I guess might make optimizations easier (although I haven't really a sample to demonstrate this.) ref. https://github.com/rust-lang/rust/issues/93743 Suggested by `@chrisduerr`
2025-07-07Rollup merge of #143544 - workingjubilee:rename-bare-fn, r=fmeaseJacob Pratt-120/+114
compiler: rename BareFn to FnPtr At some point "BareFn" was the chosen name for a "bare" function, without the niceties of `~fn`, `&fn`, or a few other ways of writing a function type. However, at some point the syntax for a "bare function" and any other function diverged even more. We started calling them what they are: function pointers, denoted by their own syntax. However, we never changed the *internal* name for these, as this divergence was very gradual. Personally, I have repeatedly searched for "FnPtr" and gotten confused until I find the name is BareFn, only to forget this until the next time, since I don't routinely interact with the higher-level AST and HIR. But even tools that interact with these internal types only touch on them in a few places, making a migration easy enough. Let's use a more intuitive and obvious name, as this 12+ year old name has little to do with current Rust.
2025-07-07Rollup merge of #143535 - reallesee:patch-1, r=jdonszelmannJacob Pratt-1/+1
Remove duplicate word Deleted a duplicated word to improve text clarity. contains contains - contains
2025-07-07Rollup merge of #143529 - pixel27:master, r=jhprattJacob Pratt-37/+2
Renamed retain_mut to retain on LinkedList as mentioned in the ACP This is for proposal: https://github.com/rust-lang/libs-team/issues/250 The original check-in (https://github.com/rust-lang/rust/pull/114136) contained both methods **retain** and **retain_mut**, which does not conform to https://github.com/rust-lang/libs-team/issues/250#issuecomment-1766822671. I updated the retain documentation to specify **&mut e**, removed the **retain** method and renamed **retain_mut** to **retain** to conform to the request. The pull request doesn't really contain much that is new, just removes the unwanted method to meet the requirements. I've run the tests "library/alloc" on the code and no issues. Hopefully I'm not stepping on the original author's toes. I just ran across a need for the method and wondered why it was unstable.
2025-07-07Rollup merge of #143456 - joshtriplett:mbe-unused-rules-bitset, r=lqdJacob Pratt-6/+9
mbe: Change `unused_macro_rules` to a `DenseBitSet` Now that it only contains indexes, and no other information, a bitset provides a more compact and simpler representation. This builds on <https://github.com/rust-lang/rust/pull/143416>. Only the last commit is new.
2025-07-07Rollup merge of #143359 - clubby789:fallback-2024-doc, r=ibraheemdevJacob Pratt-5/+3
Link to 2024 edition page for `!` fallback changes Closes rust-lang/rust#143207
2025-07-07Rollup merge of #143344 - JonathanBrouwer:path-parser, r=jdonszelmannJacob Pratt-72/+123
Port `#[path]` to the new attribute parsing infrastructure Ports `#[path]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 This PR duplicates a change from https://github.com/rust-lang/rust/pull/143237 Draft until that one is merged
2025-07-07Rollup merge of #143236 - nxsaken:mixed_integer_ops_unsigned_sub, r=ibraheemdevJacob Pratt-8/+8
Stabilize `mixed_integer_ops_unsigned_sub` Closes rust-lang/rust#126043.
2025-07-07Rollup merge of #143206 - Jules-Bertholet:align-attr-fixes, r=workingjubileeJacob Pratt-22/+144
Align attr fixes - Remove references to the superseded `repr(align)` syntax - Allow the attribute on fn items in `extern` blocks - Test attribute in combination with `async fn` and `dyn` r? workingjubilee Tracking issue: https://github.com/rust-lang/rust/issues/82232 `@rustbot` label A-attributes F-fn_align T-compiler
2025-07-07lib: more eagerly return `self.len()` from `ceil_char_boundary`Simonas Kazlauskas-1/+1
There is no reason to go through the complicated branch as it would always return `self.len()` in this case. Also helps debug code somewhat and I guess might make optimizations easier (although I haven't really a sample to demonstrate this.) ref. #93743 Suggested by @chrisduerr
2025-07-06Dont resolve instance of root in mir_callgraph_cyclicMichael Goulet-9/+129
2025-07-06Auto merge of #141829 - dvdsk:sleep_until_linux, r=cuviper,RalfJungbors-25/+411
Specialize sleep_until implementation for unix (except mac) related tracking issue: https://github.com/rust-lang/rust/issues/113752 Supersedes https://github.com/rust-lang/rust/pull/118480 for the reasons see: https://github.com/rust-lang/rust/issues/113752#issuecomment-2902594469 Replaces the generic catch all implementation with target_os specific ones for: linux/netbsd/freebsd/android/solaris/illumos etc. Other platforms like wasi, macos/ios/tvos/watchos and windows will follow in later separate PR's (once this is merged).
2025-07-06Skip `align` tests on wasmJules Bertholet-6/+9
2025-07-06rustfmt: migrate BareFn -> FnPtrJubilee Young-9/+9
2025-07-06clippy: migrate BareFn -> FnPtrJubilee Young-17/+17
2025-07-06rustdoc: migrate BareFn -> FnPtrJubilee Young-2/+2
2025-07-06compiler: rename {ast,hir}::BareFn* to FnPtr*Jubilee Young-92/+86
Fix some comments and related types and locals where it is obvious, e.g. - bare_fn -> fn_ptr - LifetimeBinderKind::BareFnType -> LifetimeBinderKind::FnPtrType Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2025-07-06Add more tests for invalid alignmentsJules Bertholet-5/+52
2025-07-06Add FIXME for gen et alJules Bertholet-0/+1
2025-07-06Add test for `dyn` alignmentJules Bertholet-0/+15
2025-07-06Test `async fn`Jules Bertholet-0/+7
2025-07-06Support `#[align(…)]` on fns in `extern` blocksJules Bertholet-1/+15