about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-06-25deny AMBIGUOUS_GLOB_IMPORTS; tests fail in this commitLorrensP-2158466-1/+2
2025-06-25Auto merge of #142746 - compiler-errors:super-implied-outlives, r=lcnrbors-9/+20
Apply `impl_super_outlives` optimization to new trait solver I never did rust-lang/rust#128746 for the new solver. r? lcnr
2025-06-25Auto merge of #142997 - workingjubilee:rollup-6lxec87, r=workingjubileebors-430/+4230
Rollup of 15 pull requests Successful merges: - rust-lang/rust#135731 (Implement parsing of pinned borrows) - rust-lang/rust#138780 (Add `#[loop_match]` for improved DFA codegen) - rust-lang/rust#142453 (Windows: make `read_dir` stop iterating after the first error is encountered) - rust-lang/rust#142633 (Error on invalid signatures for interrupt ABIs) - rust-lang/rust#142768 (Avoid a bitcast FFI call in transmuting) - rust-lang/rust#142825 (Port `#[track_caller]` to the new attribute system) - rust-lang/rust#142844 (Enable short-ice for Windows) - rust-lang/rust#142934 (Tweak `-Zmacro-stats` measurement.) - rust-lang/rust#142955 (Couple of test suite fixes for cg_clif) - rust-lang/rust#142977 (rustdoc: Don't mark `#[target_feature]` functions as ⚠) - rust-lang/rust#142980 (Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrect) - rust-lang/rust#142982 (Corrected spelling mistake in c_str.rs) - rust-lang/rust#142983 (Taint body on invalid call ABI) - rust-lang/rust#142988 (Update wasm-component-ld to 0.5.14) - rust-lang/rust#142993 (Update cargo) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-24Rollup merge of #142993 - ehuss:update-cargo, r=ehussJubilee-0/+0
Update cargo 2 commits in 84709f085062cbf3c51fa507527c1b2334015178..409fed7dc1553d49cb9a8c0637d12d65571346ce 2025-06-22 23:58:39 +0000 to 2025-06-23 15:55:04 +0000 - Fix potential deadlock in `CacheState::lock` (rust-lang/cargo#15698) - feat(toml): Parse support for multiple build scripts (rust-lang/cargo#15630)
2025-06-24Rollup merge of #142988 - alexcrichton:update-wasm-component-ld, ↵Jubilee-31/+23
r=Mark-Simulacrum Update wasm-component-ld to 0.5.14 This brings in a few updates to the bundled `wasm-component-ld` dependency used by the `wasm32-wasip2` target. This primarily includes support for upcoming component model async/WASIp3 support which will be convenient to have native support for a few months from now.
2025-06-24Rollup merge of #142983 - compiler-errors:taint-invalid-call-abi, ↵Jubilee-3/+70
r=workingjubilee Taint body on invalid call ABI Fixes https://github.com/rust-lang/rust/issues/142969 I'm not certain if there are any other paths that should be tainted, but they would operate similarly. Perhaps pointer coercion. Introduces `extern "rust-invalid"` for testing purposes. r? ```@workingjubilee``` or ```@oli-obk``` (or anyone)
2025-06-24Rollup merge of #142982 - MetaNova:patch-1, r=jhprattJubilee-1/+1
Corrected spelling mistake in c_str.rs Changed "you're" to "your" on line 470.
2025-06-24Rollup merge of #142980 - shepmaster:mismatched-syntaxes-multi-suggestions, ↵Jubilee-3/+3
r=ehuss Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrect `cargo fix` does not have a way of distinguishing a suggestion with multiple spans which should all be applied from multiple suggestions where only one should be applied (see rust-lang/rust#53934). `cargo fix` only works with `MachineApplicable` suggestions, so downgrading the applicability will stop `cargo` from suggesting the user run `cargo fix`. rust-analyzer does work with `MaybeIncorrect`, so interactive fixes are still available. r? `@ehuss`
2025-06-24Rollup merge of #142977 - aDotInTheVoid:rustdochtml-targetfeature, ↵Jubilee-1/+40
r=GuillaumeGomez rustdoc: Don't mark `#[target_feature]` functions as ⚠ Closes https://github.com/rust-lang/rust/issues/142952
2025-06-24Rollup merge of #142955 - bjorn3:cg_clif_test_fixes, r=jieyouxuJubilee-24/+77
Couple of test suite fixes for cg_clif Most of these are required for getting the test suite running with panic=unwind for cg_clif.
2025-06-24Rollup merge of #142934 - nnethercote:tweak-macro-stats, r=petrochenkovJubilee-43/+35
Tweak `-Zmacro-stats` measurement. It currently reports net size, i.e. size(output) - size(input). After some use I think this is sub-optimal, and it's better to just report size(output). Because for derive macros the input size is always 1, and for attribute macros it's almost always 1. r? ```@petrochenkov```
2025-06-24Rollup merge of #142844 - dpaoliello:short-ice, r=jieyouxuJubilee-4/+11
Enable short-ice for Windows Works fine for x64 without modifications. x86 MSVC is still failing. Addresses item in rust-lang/rust#128602 --- try-job: x86_64-mingw-* try-job: x86_64-msvc-* try-job: i686-msvc-*
2025-06-24Rollup merge of #142825 - jdonszelmann:track-caller, r=oli-obkJubilee-60/+92
Port `#[track_caller]` to the new attribute system r? ``@oli-obk`` depends on https://github.com/rust-lang/rust/pull/142493 Closes rust-lang/rust#142783 (didn't add a test for this, this situation should simply never come up again, the code was simply wrong. lmk if I should add it, but it won't test something very useful)
2025-06-24Rollup merge of #142768 - scottmcm:avoid-unneeded-bitcast, r=WaffleLapkinJubilee-2/+53
Avoid a bitcast FFI call in transmuting For things that only change the valid ranges, we can just return the input, rather than making the `LLVMBuildBitCast` call and having *it* then do nothing. I tried to tweak this a bit more and broke stuff, so I also added some extra tests for that as we apparently didn't have coverage.
2025-06-24Rollup merge of #142633 - folkertdev:interrupt-abi-restrict-signature, ↵Jubilee-195/+505
r=workingjubilee Error on invalid signatures for interrupt ABIs We recently added `extern "custom"`, which must have type `fn()`. The various `extern "interrupt"` ABIs impose similar constraints on the signature of functions with that ABI: `x86-interrupt` should not have a return type (linting on the exact argument types is left as future work), and the other interrupt ABIs cannot have any parameters or a return type. r? ```@workingjubilee```
2025-06-24Rollup merge of #142453 - ChrisDenton:fused, r=AmanieuJubilee-0/+1
Windows: make `read_dir` stop iterating after the first error is encountered This also essentially makes the `ReadDir` iterator fused. Which I think is pretty much what people expect anyway. [`FindNextFileW`](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-findnextfilew) doesn't document what happens if you call it after iteration ends or after an error so we're probably in implementation defined territory at that point.
2025-06-24Rollup merge of #138780 - trifectatechfoundation:loop_match_attr, ↵Jubilee-45/+2480
r=oli-obk,traviscross Add `#[loop_match]` for improved DFA codegen tracking issue: https://github.com/rust-lang/rust/issues/132306 project goal: https://github.com/rust-lang/rust-project-goals/issues/258 This PR adds the `#[loop_match]` attribute, which aims to improve code generation for state machines. For some (very exciting) benchmarks, see https://github.com/rust-lang/rust-project-goals/issues/258#issuecomment-2732965199 Currently, a very restricted syntax pattern is accepted. We'd like to get feedback and merge this now before we go too far in a direction that others have concerns with. ## current state We accept code that looks like this ```rust #[loop_match] loop { state = 'blk: { match state { State::A => { #[const_continue] break 'blk State::B } State::B => { /* ... */ } /* ... */ } } } ``` - a loop should have the same semantics with and without `#[loop_match]`: normal `continue` and `break` continue to work - `#[const_continue]` is only allowed in loops annotated with `#[loop_match]` - the loop body needs to have this particular shape (a single assignment to the match scrutinee, with the body a labelled block containing just a match) ## future work - perform const evaluation on the `break` value - support more state/scrutinee types ## maybe future work - allow `continue 'label value` syntax, which `#[const_continue]` could then use. - allow the match to be on an arbitrary expression (e.g. `State::Initial`) - attempt to also optimize `break`/`continue` expressions that are not marked with `#[const_continue]` r? ``@traviscross``
2025-06-24Rollup merge of #135731 - frank-king:feature/pin-borrow, r=eholk,traviscrossJubilee-18/+839
Implement parsing of pinned borrows This PR implements part of #130494. EDIT: It introduces `&pin mut $place` and `&pin const $place` as sugars for `std::pin::pin!($place)` and its shared reference equivalent, except that `$place` will not be moved when borrowing. The borrow check will be in charge of enforcing places cannot be moved or mutably borrowed since being pinned till dropped. ### Implementation steps: - [x] parse the `&pin mut $place` and `&pin const $place` syntaxes - [ ] borrowck of `&pin mut|const` - [ ] support autoref of `&pin mut|const` when needed
2025-06-25Auto merge of #140999 - hkBst:update-escaper, r=nnethercotebors-94/+67
update to literal-escaper 0.0.4 for better API without `unreachable` and faster string parsing This is the replacement for just the part of https://github.com/rust-lang/rust/pull/138163 dealing with the changed API of unescape functionality, since that got moved into its own crate. <del>This uses an unpublished version of literal-escaper (https://github.com/rust-lang/literal-escaper/pull/8).</del> r? `@nnethercote`
2025-06-24Update cargoEric Huss-0/+0
2025-06-24Update wasm-component-ld to 0.5.14Alex Crichton-31/+23
This brings in a few updates to the bundled `wasm-component-ld` dependency used by the `wasm32-wasip2` target. This primarily includes support for upcoming component model async/WASIp3 support which will be convenient to have native support for a few months from now.
2025-06-24Taint body on invalid call ABIMichael Goulet-1/+33
2025-06-24Add rust-invalid ABIMichael Goulet-2/+37
2025-06-24Auto merge of #142979 - matthiaskrgr:rollup-szqah4e, r=matthiaskrgrbors-406/+881
Rollup of 9 pull requests Successful merges: - rust-lang/rust#142645 (Also emit suggestions for usages in the `non_upper_case_globals` lint) - rust-lang/rust#142657 (mbe: Clean up code with non-optional `NonterminalKind`) - rust-lang/rust#142799 (rustc_session: Add a structure for keeping both explicit and default sysroots) - rust-lang/rust#142805 (Emit a single error when importing a path with `_`) - rust-lang/rust#142882 (Lazy init diagnostics-only local_names in borrowck) - rust-lang/rust#142883 (Add impl_trait_in_bindings tests from rust-lang/rust#61773) - rust-lang/rust#142943 (Don't include current rustc version string in feature removed help) - rust-lang/rust#142965 ([RTE-497] Ignore `c-link-to-rust-va-list-fn` test on SGX platform) - rust-lang/rust#142972 (Add a missing mailmap entry) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-24Enable short-ice for WindowsDaniel Paoliello-4/+11
2025-06-24fix 142783Jana Dönszelmann-5/+7
2025-06-24fix clippyJana Dönszelmann-2/+3
2025-06-24Rewrite #[track_caller]Jana Dönszelmann-53/+82
2025-06-24Corrected spelling mistake in c_str.rsMetaNova-1/+1
Changed "you're" to "your" on line 470.
2025-06-24rustdoc: Don't mark `#[target_feature]` functions as ⚠Alona Enraght-Moony-1/+40
Closes https://www.github.com/rust-lang/rust/issues/142952
2025-06-24Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrectJake Goulding-3/+3
`cargo fix` does not have a way of distinguishing a suggestion with multiple spans which should all be applied from multiple suggestions where only one should be applied (see issue 53934). `cargo fix` only works with `MachineApplicable` suggestions, so downgrading the applicability will stop `cargo` from suggesting the user run `cargo fix`. rust-analyzer does work with `MaybeIncorrect`, so interactive fixes are still available.
2025-06-24Auto merge of #142959 - bjorn3:sync_cg_clif-2025-06-24, r=bjorn3bors-125/+98
Subtree sync for rustc_codegen_cranelift The main highlight this time is a Cranelift update. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
2025-06-24Rollup merge of #142972 - tgross35:dwood-mailmap, r=davidtwcoMatthias Krüger-1/+3
Add a missing mailmap entry There aren't too many commits with the new emails, but per https://github.com/rust-lang/rust/pull/142470#issuecomment-3000079137 they belong to the same person so we may as well map them.
2025-06-24Rollup merge of #142965 - ↵Matthias Krüger-0/+1
raoulstrackx:raoul/rte-497-fix_c-link-to-rust-va-list-fn_test, r=jieyouxu [RTE-497] Ignore `c-link-to-rust-va-list-fn` test on SGX platform rust-lang/rust#141856 enables using the runner defined in bootstrap.toml to execute run-make tests. A test was added for this feature that compiles a Rust library and C code, links them together and passes the result to the runner. Unfortunately, that's not sufficient for the SGX platform; x86 machine code cannot be directly executed. This PR fixes the issue by disabling this test for SGX.
2025-06-24Rollup merge of #142943 - jieyouxu:no-rustc-version, r=compiler-errorsMatthias Krüger-44/+29
Don't include current rustc version string in feature removed help The version string is difficult to properly normalize out, and removing it isn't a huge deal (the user can query version info easily through `rustc --version` or `cargo --version`). The normalization options were all non-ideal (see https://github.com/rust-lang/rust/pull/142940#issuecomment-2998518450): - Per-test version string normalization is nasty to maintain, and we need to maintain `n` copies of it. See rust-lang/rust#142930 where the regex wasn't robust against different release channels. - Centralized compiletest normalization (with a directive opt-out) is also not ideal, because `cfg(version(..))` tests can't have those accidentally normalized out (and you'd have to remember to opt-out). r? `@workingjubilee` (discussed in rust-lang/rust#142940)
2025-06-24Rollup merge of #142883 - mominul:impl_in_bindings, r=lcnrMatthias Krüger-0/+36
Add impl_trait_in_bindings tests from #61773 This adds the [three test cases](https://github.com/rust-lang/rust/issues/61773#issuecomment-2952638727) from the rust-lang/rust#61773 as was suggested by ``@lcnr.`` I have merged the first two cases into one, named as `region-lifetimes.rs` r? ``@lcnr`` Closes rust-lang/rust#61773
2025-06-24Rollup merge of #142882 - kornelski:var-debug-info-lazy, r=petrochenkovMatthias Krüger-45/+63
Lazy init diagnostics-only local_names in borrowck `local_names` is not used during successful compilation, so not initializing it saves a little bit of work. I've also made it accessible only from the diagnostics module to make it clearer that the names are from `var_debug_info` which is technically optional and could be absent.
2025-06-24Rollup merge of #142805 - estebank:underscore-import, r=compiler-errorsMatthias Krüger-40/+188
Emit a single error when importing a path with `_` When encountering `use _;`, `use _::*'` or similar, do not emit two errors for that single mistake. This also side-steps the issue of resolve errors suggesting adding a crate named `_` to `Cargo.toml`. Fix rust-lang/rust#142662.
2025-06-24Rollup merge of #142799 - petrochenkov:expnop, r=bjorn3Matthias Krüger-97/+93
rustc_session: Add a structure for keeping both explicit and default sysroots Also avoid creating and cloning sysroot unnecessarily. Implements the suggestion from https://github.com/rust-lang/rust/pull/142089#discussion_r2132204079. r? ``@bjorn3``
2025-06-24Rollup merge of #142657 - tgross35:nonoptional-fragment-specifiers-cleanup, ↵Matthias Krüger-164/+216
r=petrochenkov mbe: Clean up code with non-optional `NonterminalKind` Since [rust-lang/rust#128425], the fragment specifier is unconditionally required in all editions. This means `NonTerminalKind` no longer needs to be optional, as we can reject this code during the expansion of `macro_rules!` rather than handling it throughout the code. Do this cleanup here. [rust-lang/rust#128425]: https://github.com/rust-lang/rust/pull/128425
2025-06-24Rollup merge of #142645 - Urgau:usage-non_upper_case_globals, r=fmeaseMatthias Krüger-15/+252
Also emit suggestions for usages in the `non_upper_case_globals` lint This PR adds suggestions for all the usages of the renamed item in the warning of the `non_upper_case_globals` lint. Fixes https://github.com/rust-lang/rust/issues/124061
2025-06-24Add a missing mailmap entryTrevor Gross-1/+3
2025-06-24Emit a single error when importing a path with `_`Esteban Küber-81/+138
When encountering `use _;`, `use _::*'` or similar, do not emit two errors for that single mistake. This also side-steps the issue of resolve errors suggesting adding a crate named `_` to `Cargo.toml`.
2025-06-24Auto merge of #142962 - GuillaumeGomez:rollup-do1coji, r=GuillaumeGomezbors-603/+700
Rollup of 7 pull requests Successful merges: - rust-lang/rust#137268 (Allow comparisons between `CStr`, `CString`, and `Cow<CStr>`.) - rust-lang/rust#142704 (Remove the deprecated unstable `concat_idents!` macro) - rust-lang/rust#142742 ([win][aarch64] Fix linking statics on Arm64EC, take 2) - rust-lang/rust#142843 (Enable reproducible-build-2 for Windows MSVC) - rust-lang/rust#142916 (rustdoc-json: Add test for `#[optimize(..)]`) - rust-lang/rust#142919 (rustdoc-json: Add test for `#[cold]`) - rust-lang/rust#142944 (Stats output tweaks) Failed merges: - rust-lang/rust#142825 (Port `#[track_caller]` to the new attribute system) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-24Don't include current rustc version string in feature removed helpJieyou Xu-44/+29
The version string is difficult to properly normalize out, and removing it isn't a huge deal (the user can query version info easily through `rustc --version` or `cargo --version`). The normalization options were all non-ideal: - Per-test version string normalization is nasty to maintain, and we need to maintain `n` copies of it. - Centralized compiletest normalization (with a directive opt-out) is also not ideal, because `cfg(version(..))` tests can't have those accidentally normalized out (and you'd have to remember to opt-out).
2025-06-24Ignore c-link-to-rust-va-list-fn test on SGX platformRaoul Strackx-0/+1
2025-06-24Add impl_trait_in_bindings testsMuhammad Mominul Huque-0/+36
2025-06-24Rollup merge of #142944 - nnethercote:stats-tweaks, r=lqdGuillaume Gomez-129/+167
Stats output tweaks Some improvements to `-Zinput-stats` and `-Zmeta-stat` inspired by the new `-Zmacro-stats`. r? `@lqd`
2025-06-24Rollup merge of #142919 - aDotInTheVoid:cold-cold-attr-for-you, r=GuillaumeGomezGuillaume Gomez-0/+3
rustdoc-json: Add test for `#[cold]` Follow-up to https://github.com/rust-lang/rust/pull/142491 r? `@GuillaumeGomez` CC `@jdonszelmann`
2025-06-24Rollup merge of #142916 - aDotInTheVoid:you-can-trip-on-my-optimizer, ↵Guillaume Gomez-0/+13
r=GuillaumeGomez rustdoc-json: Add test for `#[optimize(..)]` Follow up to https://github.com/rust-lang/rust/pull/138291 CC `@jdonszelmann` r? `@GuillaumeGomez`