about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-07-15Auto merge of #143460 - JonathanBrouwer:cfg_parser, r=jdonszelmannbors-428/+897
Port `#[cfg]` to the new attribute parsing infrastructure Ports `#[cfg]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 I've split this PR into commits for reviewability, and left some comments to clarify things
2025-07-15New example for E0536Jonathan Brouwer-16/+13
2025-07-15Changes to diagnosticsJonathan Brouwer-98/+163
2025-07-15Define attribute parser & config evaluatorJonathan Brouwer-264/+325
2025-07-15Move `cfg` -> `cfg_old`Jonathan Brouwer-1/+250
2025-07-15Allow `Early` stage to emit errorsJonathan Brouwer-18/+93
2025-07-15Define datastructures for `#[cfg]` attribute, move StrippedCfgItemJonathan Brouwer-31/+53
2025-07-14Auto merge of #142885 - a1phyr:borrowed_cursor_to_buf, r=Mark-Simulacrumbors-0/+87
core: Add `BorrowedCursor::with_unfilled_buf` Implementation of https://github.com/rust-lang/libs-team/issues/367. This mainly adds `BorrowedCursor::with_unfilled_buf`, with enables using the unfilled part of a cursor as a `BorrowedBuf`. Note that unlike the ACP, `BorrowedCursor::unfilled_buf` was moved to a `From` conversion. This is more consistent with other ways of creating a `BorrowedBuf` and hides a bit this conversion that requires unsafe code to be used correctly. Cc rust-lang/rust#78485 rust-lang/rust#117693
2025-07-14Auto merge of #143745 - flip1995:clippy-subtree-update, r=Manishearthbors-631/+3310
Clippy subtree update r? `@Manishearth` Cargo.lock update due to `ui_test` bump and restructure.
2025-07-14Auto merge of #143934 - samueltardieu:rollup-w3iw614, r=samueltardieubors-407/+461
Rollup of 8 pull requests Successful merges: - rust-lang/rust#141809 (Don't call WSACleanup on process exit) - rust-lang/rust#143710 (Updates to random number generation APIs) - rust-lang/rust#143848 (Rename `stable_mir` and `rustc_smir`) - rust-lang/rust#143855 (Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing) - rust-lang/rust#143868 (warn on align on fields to avoid breaking changes) - rust-lang/rust#143870 ([COMPILETEST-UNTANGLE 6/N] Use `TestSuite` enum instead of stringly-typed test suites) - rust-lang/rust#143901 (Region constraint nits) - rust-lang/rust#143903 (Fix typos in documentation files) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-14Rollup merge of #143903 - vtjl10:master, r=jieyouxuSamuel Tardieu-2/+2
Fix typos in documentation files ## Summary Fix minor typos in documentation files to improve readability. ## Changes - **tests/mir-opt/pre-codegen/README.md**: Fix typo `condiguration` → `configuration` - **tests/ui/SUMMARY.md**: Fix typo in RFC link URL (`namepsace ` → `namespace`) ## Type of Change - [x] Documentation update - [x] Bug fix (typo correction)
2025-07-14Rollup merge of #143901 - compiler-errors:region-constraint-nits, r=lcnrSamuel Tardieu-24/+19
Region constraint nits Couple miscellaneous region constraints that have a bit to do with rust-lang/rust#143545 but stand on their own.
2025-07-14Rollup merge of #143870 - jieyouxu:compiletest-maintenance-6, r=KobzolSamuel Tardieu-20/+44
[COMPILETEST-UNTANGLE 6/N] Use `TestSuite` enum instead of stringly-typed test suites This is part of a patch series to untangle `compiletest` to hopefully nudge it towards being more maintainable. This PR should contain no functional changes.
2025-07-14Rollup merge of #143868 - jdonszelmann:fix-align-on-fields, r=workingjubileeSamuel Tardieu-6/+34
warn on align on fields to avoid breaking changes r? `@workingjubilee`
2025-07-14Rollup merge of #143855 - JonathanBrouwer:omit_gdb_pretty_printer_section, ↵Samuel Tardieu-13/+29
r=jdonszelmann Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing Ports `#[omit_gdb_pretty_printer_section]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163 r? ```@jdonszelmann```
2025-07-14Rollup merge of #143848 - makai410:smir-rename, r=oli-obkSamuel Tardieu-267/+277
Rename `stable_mir` and `rustc_smir` This PR only renames the two crate names. There is no doubt that we want to rename `stable_mir` to `rustc_public`, while it hasn't been discussed yet that what the new name for `rustc_smir` should be. This PR proposes a new name for `rustc_smir`, that is `rustc_public_shim`, since `rustc_smir` now is mostly a proxy to do calls to rustc queries and the public API of rustc that is invoked by the `rustc_public` crate. However, I don't think that name is good enough. I hope there would be a way better name. r? `@oli-obk`
2025-07-14Rollup merge of #143710 - joshtriplett:random-updates, r=joshtriplettSamuel Tardieu-60/+35
Updates to random number generation APIs Updates based on discussions about random number generation. - Add comment on `RandomSource::fill_bytes` about multiple calls, to allow efficient implementations for random sources that generate a word at a time. - Drop the `Random` trait in favor of `Distribution<T>`, which will let people make calls like random(1..=6), and which allows for future expansion to non-uniform distributions, as well as floating-point. (For now, this is only implemented for `RangeFull`, to get the interface in place. Subsequent PRs will implement it for other range types.)
2025-07-14Rollup merge of #141809 - ChrisDenton:no-cleaup, r=jhprattSamuel Tardieu-15/+21
Don't call WSACleanup on process exit This isn't necessary as cleanup will happen when the process exits regardless. fixes rust-lang/rust#141799
2025-07-14Don't call WSACleanup on process exitChris Denton-15/+21
2025-07-14Auto merge of #143919 - Kobzol:rollup-acyaygs, r=Kobzolbors-725/+665
Rollup of 10 pull requests Successful merges: - rust-lang/rust#143217 (Port #[link_ordinal] to the new attribute parsing infrastructure) - rust-lang/rust#143681 (bootstrap/miri: avoid rebuilds for test builds) - rust-lang/rust#143724 (Tidy cleanup) - rust-lang/rust#143733 (Change bootstrap's `tool.TOOL_NAME.features` to work on any subcommand) - rust-lang/rust#143850 (Compiletest: Simplify {Html,Json}DocCk directive handling) - rust-lang/rust#143875 (update issue number for `const_trait_impl`) - rust-lang/rust#143881 (Use zero for initialized Once state) - rust-lang/rust#143887 (Run bootstrap tests sooner in the `x test` pipeline) - rust-lang/rust#143917 (Change "allocated object" to "allocation".) - rust-lang/rust#143918 (Tier check cleanup) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-14Use `TestSuite` enum instead of stringly-typed test suitesJieyou Xu-20/+44
2025-07-14rename `stable_mir` to `rustc_public`, and `rustc_smir` to `rustc_public_bridge`Makai-267/+277
2025-07-14Rollup merge of #143918 - hkBst:tier-check-cleanup, r=KobzolJakub Beránek-9/+7
Tier check cleanup clippy cleanup + edition 2024
2025-07-14Rollup merge of #143917 - theemathas:change-allocated-object-to-allocation, ↵Jakub Beránek-3/+3
r=oli-obk Change "allocated object" to "allocation". These seem like they were missed in <https://github.com/rust-lang/rust/pull/141224>
2025-07-14Rollup merge of #143887 - Kobzol:reroder-bootstrap-tests, r=jieyouxuJakub Beránek-2/+1
Run bootstrap tests sooner in the `x test` pipeline With the recently added bootstrap snapshot tests, and in general with our plans to test more things in bootstrap, I feel like the original comment isn't accurate anymore. Recently, on several occasions I had to wait for 40+ minutes of CI just to find out that the bootstrap snapshot tests have failed. I think we should run bootstrap tests towards the beginning instead now. r? ```@jieyouxu```
2025-07-14Rollup merge of #143881 - orlp:once-state-repr, r=tgross35Jakub Beránek-9/+12
Use zero for initialized Once state By re-labeling which integer represents which internal state for `Once` we can ensure that the initialized state is the all-zero state. This is beneficial because some CPU architectures (such as Arm) have specialized instructions to specifically branch on non-zero, and checking for the initialized state is by far the most important operation. As an example, take this: ```rust use std::sync::atomic::{AtomicU32, Ordering}; const INIT: u32 = 3; #[inline(never)] #[cold] pub fn slow(state: &AtomicU32) { state.store(INIT, Ordering::Release); } pub fn ensure_init(state: &AtomicU32) { if state.load(Ordering::Acquire) != INIT { slow(state) } } ``` If `INIT` is 3 (as is currently the state for `Once`), we see the following assembly on `aarch64-apple-darwin`: ```asm example::ensure_init::h332061368366e313: ldapr w8, [x0] cmp w8, #3 b.ne LBB1_2 ret LBB1_2: b example::slow::ha042bd6a4f33724e ``` By changing the `INIT` state to zero we get the following: ```asm example::ensure_init::h332061368366e313: ldapr w8, [x0] cbnz w8, LBB1_2 ret LBB1_2: b example::slow::ha042bd6a4f33724e ``` So this PR saves 1 instruction every time a `LazyLock` gets accessed on platforms such as these.
2025-07-14Rollup merge of #143875 - fee1-dead-contrib:push-zvqrmzrprpzt, r=compiler-errorsJakub Beránek-67/+67
update issue number for `const_trait_impl` r? project-const-traits cc rust-lang/rust#67792 rust-lang/rust#143874
2025-07-14Rollup merge of #143850 - fmease:comptest-simp-docck-handling, r=jieyouxuJakub Beránek-359/+294
Compiletest: Simplify {Html,Json}DocCk directive handling So much more maintainable and extensible. r? ````@jieyouxu```` as discussed
2025-07-14Rollup merge of #143733 - Stypox:bootstrap-tool-config-any, r=KobzolJakub Beránek-16/+23
Change bootstrap's `tool.TOOL_NAME.features` to work on any subcommand This is a followup to rust-lang/rust#142379 to make the bootstrap option `tool.TOOL_NAME.features` work on any subcommand instead of just build (so also run/test/...). I also made the `TOOL_NAME` comparisons look at the tool path instead of the tool name to determine to which tool a `TOOL_NAME` refers to, so you can specify tools by path like in other places of the bootstrap (e.g. `tool."tools/miri".features`).
2025-07-14Rollup merge of #143724 - hkBst:tidy-cleanup, r=Mark-SimulacrumJakub Beránek-108/+91
Tidy cleanup
2025-07-14Rollup merge of #143681 - RalfJung:bootstrap-miri-rebuilds, r=KobzolJakub Beránek-2/+8
bootstrap/miri: avoid rebuilds for test builds When building Miri in its own repo, we always build with `--all-targets`: https://github.com/rust-lang/rust/blob/a00961269107703772c4e8f071f0accbe0f1a7e5/src/tools/miri/miri-script/src/util.rs#L167-L174 This saves a bunch of time since some of Miri's dependencies get more features enabled by some of Miri's dev-dependencies, and they all get built twice otherwise if you do `cargo build && cargo test` (which is typically what you end up doing inside `./miri test` and also inside `./x test miri`). This applies the same approach to bootstrap, drastically reducing the edit-compile cycle for Miri work here. :)
2025-07-14Rollup merge of #143217 - Periodic1911:link-ordinal, r=jdonszelmannJakub Beránek-150/+159
Port #[link_ordinal] to the new attribute parsing infrastructure Ports link_ordinal to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
2025-07-14Update SUMMARY.mdfuder.eth-2/+2
Update README.md
2025-07-14Auto merge of #143873 - dianqk:update-llvm, r=nikicbors-1/+1
Update LLVM to 20.1.8 I made a new branch with patches that aren't yet in LLVM 20.1.8.
2025-07-14tiercheck: edition 2024Marijn Schouten-1/+1
2025-07-14tiercheck: clippy fixesMarijn Schouten-8/+6
2025-07-14Change "allocated object" to "allocation".Tim (Theemathas) Chirananthavat-3/+3
These seem like they were missed in <https://github.com/rust-lang/rust/pull/141224>
2025-07-14Add comment about features not part of "extra-features"Stypox-1/+2
2025-07-14Only compare tool name to apply features toStypox-1/+2
2025-07-14Bootstrap's `tool.TOOL_NAME.features` now works on any subcommandStypox-15/+20
2025-07-14Auto merge of #143779 - JonathanBrouwer:automatically_derived_parser, r=oli-obkbors-50/+92
Port `#[automatically_derived]` to the new attribute parsing infrastructure Ports `#[automatically_derived]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163 r? `@oli-obk` cc `@jdonszelmann`
2025-07-13Auto merge of #143357 - cjgillot:no-assoc-item-kind, r=compiler-errorsbors-898/+663
Retire hir::*ItemRef. This information was kept for various places that iterate on HIR to know about trait-items and impl-items. This PR replaces them by uses of the `associated_items` query that contain pretty much the same information. This shortens many spans to just `def_span`, which can be easier to read.
2025-07-13Simplify make_query_region_constraintsMichael Goulet-23/+15
2025-07-13Make sure that users don't take region obligations in a snapshotMichael Goulet-1/+4
2025-07-13Auto merge of #143461 - folkertdev:cfg-select-builtin-macro, r=petrochenkovbors-52/+299
make `cfg_select` a builtin macro tracking issue: https://github.com/rust-lang/rust/issues/115585 This parses mostly the same as the `macro cfg_select` version, except: 1. wrapping in double brackets is no longer supported (or needed): `cfg_select {{ /* ... */ }}` is now rejected. 2. in an expression context, the rhs is no longer wrapped in a block, so that this now works: ```rust fn main() { println!(cfg_select! { unix => { "foo" } _ => { "bar" } }); } ``` 3. a single wildcard rule is now supported: `cfg_select { _ => 1 }` now works I've also added an error if none of the rules evaluate to true, and warnings for any arms that follow the `_` wildcard rule. cc `@traviscross` if I'm missing any feature that should/should not be included r? `@petrochenkov` for the macro logic details
2025-07-13update issue number for `const_trait_impl`Deadbeef-67/+67
2025-07-13Auto merge of #143888 - matthiaskrgr:rollup-fv9x7kf, r=matthiaskrgrbors-581/+1032
Rollup of 11 pull requests Successful merges: - rust-lang/rust#143301 (`tests/ui`: A New Order [26/N]) - rust-lang/rust#143519 (Check assoc consts and tys later like assoc fns) - rust-lang/rust#143554 (slice: Mark `rotate_left`, `rotate_right` unstably const) - rust-lang/rust#143634 (interpret/allocation: expose init + write_wildcards on a range) - rust-lang/rust#143685 (Resolve: merge `source_bindings` and `target_bindings` into `bindings`) - rust-lang/rust#143734 (Refactor resolve resolution bindings) - rust-lang/rust#143774 (constify `From` and `Into`) - rust-lang/rust#143785 (Add --compile-time-deps argument for x check) - rust-lang/rust#143786 (Fix fallback for CI_JOB_NAME) - rust-lang/rust#143825 (clippy: fix test filtering when TESTNAME is empty) - rust-lang/rust#143826 (Fix command trace) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-13Compiletest: Simplify {Html,Json}DocCk directive handlingLeón Orell Valerian Liehr-359/+294
2025-07-13Bless incremental tests.Camille GILLOT-3/+3
2025-07-13Retire hir::*ItemRef.Camille GILLOT-308/+244