about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-06-20configure.py: fix edge casebinarycat-1/+1
2025-06-20bootstrap.example.toml: add note explaining tomlbinarycat-0/+8
2025-06-20update configure.py to handle new bootstrap.example.tomlbinarycat-8/+25
2025-06-17bootstrap.example.toml: use less contextual formatbinarycat-194/+189
prefixing each key with its section means you don't need to scroll up 4 pages to see which section a particular key is from. target specific options were kept in old format since the exact section name depends on the target, so those options must now be moved to the bottom of the file.
2025-06-16Auto merge of #142574 - Kobzol:rollup-ldj386u, r=Kobzolbors-203/+693
Rollup of 12 pull requests Successful merges: - rust-lang/rust#141639 (Expose discriminant values in stable_mir) - rust-lang/rust#142082 (Refactor `rustc_attr_data_structures` documentation) - rust-lang/rust#142125 (Stabilize "file_lock" feature) - rust-lang/rust#142236 (Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls) - rust-lang/rust#142373 (Fix Debug for Location) - rust-lang/rust#142416 (Assorted bootstrap cleanups (step 2)) - rust-lang/rust#142431 (Add initial version of snapshot tests to bootstrap) - rust-lang/rust#142450 (Add documentation on top of `rustc_middle/src/query/mod.rs`) - rust-lang/rust#142528 (clarify `rustc_do_not_const_check` comment) - rust-lang/rust#142530 (use `if let` guards where possible) - rust-lang/rust#142561 (Remove an `njn:` comment accidentaly left behind.) - rust-lang/rust#142566 (Fix `-nopt` CI jobs) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-16Rollup merge of #142566 - Kobzol:ci-nopt-fix, r=jieyouxuJakub Beránek-10/+2
Fix `-nopt` CI jobs They were using `--config` instead of `--set`, which overrides too much stuff after recent changes to config merging. Should hopefully unblock https://github.com/rust-lang/rust/pull/142447. r? `@jieyouxu`
2025-06-16Rollup merge of #142561 - nnethercote:fix-njn-comment, r=chenyukangJakub Beránek-1/+2
Remove an `njn:` comment accidentaly left behind. r? `@chenyukang`
2025-06-16Rollup merge of #142530 - fee1-dead-contrib:push-klusvwusyqvq, r=compiler-errorsJakub Beránek-20/+12
use `if let` guards where possible these crates already enable the feature
2025-06-16Rollup merge of #142528 - fee1-dead-contrib:push-rlxklunqkwmv, r=RalfJungJakub Beránek-2/+2
clarify `rustc_do_not_const_check` comment ~~Given that we have used this attribute for other reasons before it seems appropriate to make this a "usually".~~ Add function name as a pointer cc ```@rust-lang/wg-const-eval```
2025-06-16Rollup merge of #142450 - xizheyin:rustc-query-doc, r=SparrowLiiJakub Beránek-4/+60
Add documentation on top of `rustc_middle/src/query/mod.rs` The `rustc-dev-guide` gives a high-level intro, but many details—especially about how the code works and modifiers in `query xxx(){...}`—are only in code comments or the macro implementation. This doc makes it easier for contributors and code readers to understand the workflow and available modifiers without jumping between files and docs. This PR adds a comprehensive module-level doc comment to `rustc_middle::query::mod.rs` that: 1. Provides an overview of the query system and macro-based query definitions for reading code more easily 2. Centralizes documentation for all query modifiers (previously scattered or only in `rustc_macro` code), closely following the authoritative list in QueryModifiers.
2025-06-16Rollup merge of #142431 - Kobzol:bootstrap-snapshot-tests, r=jieyouxuJakub Beránek-20/+158
Add initial version of snapshot tests to bootstrap When making any changes to bootstrap (steps), it is very difficult to realize how does it affect various common bootstrap commands, and if everything still works as we expect it to. We are far away from having actual end-to-end tests, but what we could at least do is have a way of testing what steps does bootstrap execute in dry run mode. Now, we already have something like this in `src/bootstrap/src/core/builder/tests.rs`, however that is quite limited, because it only checks executed steps for a specific impl of `Step` and it does not consider step order. Recently, when working on what I thought was one of the simplest possible step untanglings in bootstrap (https://github.com/rust-lang/rust/pull/142357), I ran into errors in tests that were quite hard to debug. Partly also because the current staging test diffs are multiline and use `Debug` output, so it's quite difficult for me to make sense of them. In this PR, I introduce `insta`, which allows writing snapshot tests in a very simple way. With it, I want to allow writing tests that will clearly show us what is going on during bootstrap execution, and then write golden tests for `build/check/test` stage `0/1/2` for compiler/std/tools etc., to make sure that we don't regress something, and also to help with [#t-infra/bootstrap > Proposal to cleanup stages and steps after the redesign](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Proposal.20to.20cleanup.20stages.20and.20steps.20after.20the.20redesign/with/523488806), to help avoid a situation where we would (again) have to make a flurry of staging changes because of unexpected consequences. In the snapshot tests, we currently render the build of rustc, std and LLVM. Currently I render the executed steps using downcasting, which is not super pretty, but it allows us to make the test rendering localized in one place, and it's IMO enough for now. I implemented only a single test using the new machinery. Maybe if you take a look at it, you will understand why :laughing: Bootstrap currently does some peculiar things, such as running a stage 0 std step (even though stage 0 std no longer exists) and running the Rustc stage 0 -> 1 step twice, once with a single crates, once with all rustc crates. So I think that even with this single step, there will be a bunch of things to fix in the near future... The way we currently prepare the Config test fixtures is far from ideal, this is something I think ``@Shourya742`` could work on as a part of their GSoC project (remove as much command execution from Config construction as possible, actually run bootstrap on a temporary directory instead of running it on the rustc checkout, create a Builder-like API for creating the Config test fixtures). r? ``@jieyouxu``
2025-06-16Rollup merge of #142416 - Kobzol:bootstrap-cleanup-2, r=jieyouxuJakub Beránek-106/+97
Assorted bootstrap cleanups (step 2) Very small improvements designed towards making bootstrap tests less hacky/special, and towards making it possible to run bootstrap tests in parallel. Best reviewed commit by commit. r? ``@jieyouxu``
2025-06-16Rollup merge of #142373 - m-ou-se:debug-for-location, r=tgross35Jakub Beránek-1/+20
Fix Debug for Location Fixes https://github.com/rust-lang/rust/issues/142279
2025-06-16Rollup merge of #142236 - yotamofek:pr/std/pathbuf-extend-docs, r=tgross35Jakub Beránek-0/+27
Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls I think it's not very obvious that `PathBuf`'s `Extend` and `FromIterator` impls work like `PathBuf::push`, so I think these should be documented. I'm not very happy with the wording and examples, open to suggestions :)
2025-06-16Rollup merge of #142125 - cberner:file_lock_stable, r=ChrisDentonJakub Beránek-17/+11
Stabilize "file_lock" feature Closes https://github.com/rust-lang/rust/issues/130994 r? ```@joshtriplett```
2025-06-16Rollup merge of #142082 - xizheyin:rustc_attr_data_structures, r=jdonszelmannJakub Beránek-14/+48
Refactor `rustc_attr_data_structures` documentation I was reading through `AttributeKind` and realized that attributes like `InlineAttr` didn't appear in it, however, I found them in `rustc_codegen_ssa` and understood why (guessing). There's almost no overall documentation for this crate, I've added the organized documentation at the top of `lib.rs`, and I've grouped the Attributes into two categories: `AttributeKind` that run all through the compiler, and the ones that are only used in `codegen_ssa`, such as `InlineAttr`, `OptimizeAttr`, `InstructionSetAttr`. Also, I've added documentation for `AttributeKind` that further explains why attributes like `InlineAttr` don't appear in it, with examples for each variant. r? ```@jdonszelmann```
2025-06-16Rollup merge of #141639 - NotLebedev:stable-mir-93, r=oli-obkJakub Beránek-8/+254
Expose discriminant values in stable_mir Resolves https://github.com/rust-lang/project-stable-mir/issues/93 * Added `Discr` struct to stable mir as stable version of struct with same name * Added `discriminant_for_variant` method to `AdtDef` and `CoroutineDef`
2025-06-16Auto merge of #142556 - RalfJung:miri-sync, r=RalfJungbors-1013/+882
Miri subtree update r? `@ghost`
2025-06-16Fix `-nopt` CI jobsJakub Beránek-10/+2
They were using `--config` instead of `--set`, which overrides too much stuff.
2025-06-16Fix test descriptionNotLebedev-2/+2
2025-06-16Add test for `AdtDef::discriminant_for_variant` polymorphic over parameterNotLebedev-0/+29
2025-06-16Add test for `AdtDef::discriminant_for_variant`NotLebedev-0/+154
2025-06-16Implement Stable for DiscrNotLebedev-14/+15
2025-06-16Add discriminant_for_variant to CoroutineDefNotLebedev-8/+44
2025-06-16Add discriminant_for_variant to AdtDefNotLebedev-4/+30
2025-06-16Add documentation for `PathBuf`'s `FromIterator` and `Extend` implsYotam Ofek-0/+27
2025-06-16Add documentation on top of `rustc_middle/src/query/mod.rs`xizheyin-4/+60
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-16Remove an `njn:` comment accidentaly left behind.Nicholas Nethercote-1/+2
2025-06-16Auto merge of #142521 - sayantn:simplify-intrinsics, r=nikic,workingjubileebors-242/+55
Use `LLVMIntrinsicGetDeclaration` to completely remove the hardcoded intrinsics list Follow-up to rust-lang/rust#142259 This also needs a rustc-perf run, because `Intrinsic::getType` can be expensive `@rustbot` label A-LLVM A-codegen T-compiler r? `@workingjubilee` cc `@nikic`
2025-06-16Test Debug for Location.Mara Bos-0/+8
2025-06-16Auto merge of #142550 - fmease:rollup-fteyzcv, r=fmeasebors-1030/+2791
Rollup of 10 pull requests Successful merges: - rust-lang/rust#133952 (Remove wasm legacy abi) - rust-lang/rust#134661 (Reduce precedence of expressions that have an outer attr) - rust-lang/rust#141769 (Move metadata object generation for dylibs to the linker code ) - rust-lang/rust#141937 (Report never type lints in dependencies) - rust-lang/rust#142347 (Async drop - fix for StorageLive/StorageDead codegen for pinned future) - rust-lang/rust#142389 (Apply ABI attributes on return types in `rustc_codegen_cranelift`) - rust-lang/rust#142470 (Add some missing mailmap entries) - rust-lang/rust#142481 (Add `f16` inline asm support for LoongArch) - rust-lang/rust#142499 (Remove check run bootstrap) - rust-lang/rust#142543 (Suggest adding semicolon in user code rather than macro impl details) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-15Rollup merge of #142543 - Urgau:span-borrowck-semicolon, r=fmeaseLeón Orell Valerian Liehr-3/+166
Suggest adding semicolon in user code rather than macro impl details This PR tries to find the right span (by peeling expansion) so that the suggestion for adding a semicolon is suggested in user code rather than in the expanded code (in the example a macro impl). Fixes rust-lang/rust#139049 r? `@fmease`
2025-06-15Rollup merge of #142499 - Shourya742:2025-06-14-remove-check-run-bootstrap, ↵León Orell Valerian Liehr-50/+19
r=Kobzol Remove check run bootstrap This PR migrates all usage of check_run to new execution context api's. r? `@Kobzol`
2025-06-15Rollup merge of #142481 - heiher:loong-asm-f16, r=AmanieuLeón Orell Valerian Liehr-4/+51
Add `f16` inline asm support for LoongArch r? `````@Amanieu`````
2025-06-15Rollup merge of #142470 - tgross35:mailmap, r=Mark-SimulacrumLeón Orell Valerian Liehr-0/+7
Add some missing mailmap entries
2025-06-15Rollup merge of #142389 - beetrees:cranelift-arg-ext, r=bjorn3León Orell Valerian Liehr-27/+1161
Apply ABI attributes on return types in `rustc_codegen_cranelift` - The [x86-64 System V ABI standard](https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build) doesn't sign/zero-extend integer arguments or return types. - But the de-facto standard as implemented by Clang and GCC is to sign/zero-extend arguments to 32 bits (but not return types). - Additionally, Apple targets [sign/zero-extend both arguments and return values to 32 bits](https://developer.apple.com/documentation/xcode/writing-64-bit-intel-code-for-apple-platforms#Pass-arguments-to-functions-correctly). - However, the `rustc_target` ABI adjustment code currently [unconditionally extends both arguments and return values to 32 bits](https://github.com/rust-lang/rust/blame/e703dff8fe220b78195c53478e83fb2f68d8499c/compiler/rustc_target/src/callconv/x86_64.rs#L240) on all targets. - This doesn't cause a miscompilation when compiling with LLVM as LLVM will ignore the `signext`/`zeroext` attribute when applied to return types on non-Apple x86-64 targets. - Cranelift, however, does not have a similar special case, requiring `rustc` to set the argument extension attribute correctly. - However, `rustc_codegen_cranelift` doesn't currently apply ABI attributes to return types at all, meaning `rustc_codegen_cranelift` will currently miscompile `i8`/`u8`/`i16`/`u16` returns on x86-64 Apple targets as those targets require sign/zero-extension of return types. This PR fixes the bug(s) by making the `rustc_target` x86-64 System V ABI only mark return types as sign/zero-extended on Apple platforms, while also making `rustc_codegen_cranelift` apply ABI attributes to return types. The RISC-V and s390x C ABIs also require sign/zero extension of return types, so this will fix those targets when building with `rustc_codegen_cranelift` too. r? `````@bjorn3`````
2025-06-15Rollup merge of #142347 - azhogin:azhogin/async-drop-storage-live-dead-fix, ↵León Orell Valerian Liehr-9/+387
r=oli-obk Async drop - fix for StorageLive/StorageDead codegen for pinned future Fixes: rust-lang/rust#140429, Fixes: rust-lang/rust#140531, Fixes: rust-lang/rust#141761, Fixes: rust-lang/rust#141409. StorageLive/StorageDead codegen is corrected for pinned async drop future.
2025-06-15Rollup merge of #141937 - WaffleLapkin:never-report-in-deps, ↵León Orell Valerian Liehr-0/+647
r=oli-obk,traviscross Report never type lints in dependencies This PR marks never type lints (`never_type_fallback_flowing_into_unsafe` & `dependency_on_unit_never_type_fallback`) to be included in cargo's reports / to be emitted when they happen in dependencies. This PR is based on rust-lang/rust#141936 r? oli-obk
2025-06-15Rollup merge of #141769 - bjorn3:codegen_metadata_module_rework, ↵León Orell Valerian Liehr-290/+161
r=workingjubilee,saethlin Move metadata object generation for dylibs to the linker code This deduplicates some code between codegen backends and may in the future allow adding extra metadata that is only known at link time. Prerequisite of https://github.com/rust-lang/rust/issues/96708.
2025-06-15Rollup merge of #134661 - dtolnay:prefixattr, r=fmeaseLeón Orell Valerian Liehr-49/+164
Reduce precedence of expressions that have an outer attr Previously, `-Zunpretty=expanded` would expand this program as follows: ```rust #![feature(stmt_expr_attributes)] macro_rules! repro { ($e:expr) => { #[allow(deprecated)] $e }; } #[derive(Default)] struct Thing { #[deprecated] field: i32, } fn main() { let thing = Thing::default(); let _ = repro!(thing).field; } ``` ```rs #![feature(prelude_import)] #![feature(stmt_expr_attributes)] #[prelude_import] use std::prelude::rust_2021::*; #[macro_use] extern crate std; struct Thing { #[deprecated] field: i32, } #[automatically_derived] impl ::core::default::Default for Thing { #[inline] fn default() -> Thing { Thing { field: ::core::default::Default::default() } } } fn main() { let thing = Thing::default(); let _ = #[allow(deprecated)] thing.field; } ``` This is not the correct expansion. The correct output would have `(#[allow(deprecated)] thing).field` with the attribute applying only to `thing`, not to `thing.field`.
2025-06-15Rollup merge of #133952 - bjorn3:remove_wasm_legacy_abi, r=alexcrichtonLeón Orell Valerian Liehr-598/+28
Remove wasm legacy abi Closes https://github.com/rust-lang/rust/issues/122532 Closes https://github.com/rust-lang/rust/issues/138762 Fixes https://github.com/rust-lang/rust/issues/71871 https://github.com/rust-lang/rust/issues/88152 Fixes https://github.com/rust-lang/rust/issues/115666 Fixes https://github.com/rust-lang/rust/issues/129486
2025-06-15Auto merge of #142471 - lqd:sparse-borrows, r=nnethercotebors-6/+6
use `MixedBitSet` for borrows-in-scope dataflow analysis The `Borrows` dataflow analysis uses a dense bitset, but a bitset supporting _some_ amount of sparseness is better suited for big functions with a big number of loans. The cutoff between dense and chunked bitset is around 2K loans IIRC, and we could finesse that value if we wanted to, but as-is it happens to a couple of rustc-perf benchmarks (which IIRC are at least partially generated from macros and the likes.). It's a small win on these two, and shouldn't have any impact on the others. r? `@matthewjasper`
2025-06-15Suggest adding semicolon in user code rather than macro impl detailsUrgau-3/+166
2025-06-15Correctly account for different address spaces in LLVM intrinsic invocationssayantn-19/+24
2025-06-15Auto merge of #142455 - ↵bors-9/+81
jdonszelmann:attempt-to-mitigate-delayed-lint-perf-problems, r=oli-obk collect delayed lints in hir_crate_items r? `@oli-obk` Attempt to mitigate perf problems in rust-lang/rust#138164
2025-06-15Use `LLVMIntrinsicGetDeclaration` to completely remove the hardcoded ↵sayantn-224/+32
intrinsics list
2025-06-15Stabilize "file_lock" featureChristopher Berner-17/+11
2025-06-15Auto merge of #142430 - compiler-errors:external-constraints, r=lcnrbors-0/+22
Don't fold `ExternalConstraintsData` when it's empty Probably useless, but let's see. r? lcnr
2025-06-15clarify `rustc_do_not_const_check` commentDeadbeef-2/+2
2025-06-15Merge pull request #4400 from RalfJung/rustupRalf Jung-2903/+2619
Rustup