about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-06-24Rollup merge of #142843 - dpaoliello:reproducible-build-2, r=jieyouxuGuillaume Gomez-12/+32
Enable reproducible-build-2 for Windows MSVC Works with MSVC if instructing the linker to avoid timestamps and deleting the PDB between compilations. 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 #142742 - dpaoliello:arm64eclinking, r=bjorn3Guillaume Gomez-51/+197
[win][aarch64] Fix linking statics on Arm64EC, take 2 Arm64EC builds recently started to fail due to the linker not finding a symbol: ``` symbols.o : error LNK2001: unresolved external symbol #_ZN3std9panicking11EMPTY_PANIC17hc8d2b903527827f1E (EC Symbol) C:\Code\hello-world\target\arm64ec-pc-windows-msvc\debug\deps\hello_world.exe : fatal error LNK1120: 1 unresolved externals ``` It turns out that `EMPTY_PANIC` is a new static variable that was being exported then imported from the standard library, but when exporting LLVM didn't prepend the name with `#` (as only functions are prefixed with this character), whereas Rust was prefixing with `#` when attempting to import it. The fix is to have Rust not prefix statics with `#` when importing. Adding tests discovered another issue: we need to correctly mark static exported from dylibs with `DATA`, otherwise MSVC's linker assumes they are functions and complains that there is no exit thunk for them. Fixes rust-lang/rust#138541 Resurrects rust-lang/rust#140176 now that rust-lang/rust#141061 is merged, which removes the incompatibility with `__rust_no_alloc_shim_is_unstable`. r? ``@wesleywiser`` CC ``@bjorn3``
2025-06-24Rollup merge of #142704 - tgross35:remove-concat_idents, r=fee1-deadGuillaume Gomez-411/+165
Remove the deprecated unstable `concat_idents!` macro In [rust-lang/rust#137653], the lang and libs-API teams did a joint FCP to deprecate and eventually remove the long-unstable `concat_idents!` macro. The deprecation is landing in 1.88, so do the removal here (target version 1.90). This macro has been superseded by the more recent `${concat(...)}` metavariable expression language feature, which avoids some of the limitations of `concat_idents!`. The metavar expression is unstably available under the [`macro_metavar_expr_concat`] feature. History is mildly interesting here: `concat_idents!` goes back to 2011 when it was introduced with 513276e595f8 ("Add #concat_idents[] and #ident_to_str[]"). The syntax looks a bit different but it still works about the same: let asdf_fdsa = "<.<"; assert(#concat_idents[asd,f_f,dsa] == "<.<"); assert(#ident_to_str[use_mention_distinction] == "use_mention_distinction"); (That test existed from introduction until its removal here.) Closes: https://github.com/rust-lang/rust/issues/29599 [rust-lang/rust#137653]: https://github.com/rust-lang/rust/pull/137653 [`macro_metavar_expr_concat`]: https://github.com/rust-lang/rust/issues/124225
2025-06-24Rollup merge of #137268 - bjoernager:c-string-eq-c-str, r=AmanieuGuillaume Gomez-0/+123
Allow comparisons between `CStr`, `CString`, and `Cow<CStr>`. Closes: #137265 This PR adds the trait implementations proposed in the [ACP](https://github.com/rust-lang/libs-team/issues/517/) under the `c_string_eq_c_str` feature gate: ```rust // core::ffi impl PartialEq<&Self> for CStr; impl PartialEq<CString> for CStr; impl PartialEq<Cow<'_, Self>> for CStr; // alloc::ffi impl PartialEq<CStr> for CString; impl PartialEq<&CStr> for CString; impl PartialEq<Cow<'_, CStr>> for CString; // alloc::borrow impl PartialEq<CStr> for Cow<'_, CStr>; impl PartialEq<&CStr> for Cow<'_, CStr>; impl PartialEq<CString> for Cow<'_, CStr>; ``` As I understand it, stable traits cannot be unstably implemented for stable types, and we would thereby be forced to skip the FCP and directly stabilise these implementations (as is done in this PR). (`@joshtriplett` mentioned that Crater may have to be run).
2025-06-24rustc_session: Add a structure for keeping both explicit and default sysrootsVadim Petrochenkov-97/+93
Also avoid creating and cloning sysroot unnecessarily.
2025-06-24Error on invalid signatures for interrupt ABIsFolkert de Vries-195/+505
2025-06-24Fix expect_fun_call producing invalid suggestionsKamal Ahmad-136/+102
2025-06-24Update tidy exceptionsbjorn3-0/+3
2025-06-24Merge commit '8c848e0604b5d26fad120914f822f564fe05c52a' into ↵bjorn3-125/+95
sync_cg_clif-2025-06-24
2025-06-24Remove the deprecated `concat_idents!` macroTrevor Gross-335/+53
In [137653], the lang and libs-API teams did a joint FCP to deprecate and eventually remove the long-unstable `concat_idents!` macro. The deprecation is landing in 1.88, so do the removal here (target version 1.90). This macro has been superseded by the more recent `${concat(...)}` metavariable expression language feature, which avoids some of the limitations of `concat_idents!`. The metavar expression is unstably available under the [`macro_metavar_expr_concat`] feature. History is mildly interesting here: `concat_idents!` goes back to 2011 when it was introduced with 513276e595f8 ("Add #concat_idents[] and about the same: let asdf_fdsa = "<.<"; assert(#concat_idents[asd,f_f,dsa] == "<.<"); assert(#ident_to_str[use_mention_distinction] == "use_mention_distinction"); (That test existed from introduction until its removal here.) Closes: https://www.github.com/rust-lang/rust/issues/29599 [137653]: https://www.github.com/rust-lang/rust/pull/137653 [`macro_metavar_expr_concat`]: https://www.github.com/rust-lang/rust/issues/124225
2025-06-24Move some `issues-*` tests to better homesTrevor Gross-8/+6
These tests were updated in the previous commit; while they are being cleaned up, move them to a non-issue directory.
2025-06-24Migrate some tests away from `concat-idents`Trevor Gross-57/+95
`concat_idents!` is in the process of being removed, but a few things it is used to test will still be relevant. Migrate these tests to something other than `concat_idents`.
2025-06-24Rustup to rustc 1.90.0-nightly (706f244db 2025-06-23)bjorn3-1/+1
2025-06-24Auto merge of #142956 - GuillaumeGomez:rollup-867246h, r=GuillaumeGomezbors-236/+681
Rollup of 9 pull requests Successful merges: - rust-lang/rust#140005 (Set MSG_NOSIGNAL for UnixStream) - rust-lang/rust#140622 (compiletest: Improve diagnostics for line annotation mismatches) - rust-lang/rust#142354 (Fixes firefox copy paste issue) - rust-lang/rust#142695 (Port `#[rustc_skip_during_method_dispatch]` to the new attribute system) - rust-lang/rust#142779 (Add note about `str::split` handling of no matches.) - rust-lang/rust#142894 (phantom_variance_markers: fix identifier usage in macro) - rust-lang/rust#142928 (Fix hang in --print=file-names in bootstrap) - rust-lang/rust#142932 (rustdoc-json: Keep empty generic args if parenthesized) - rust-lang/rust#142933 (Simplify root goal API of solver a bit) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-24Remove special casing in command factory (revert changes in ctx.ts), update ↵Mark Pots-12/+3
main.createCommands instead
2025-06-24Rollup merge of #142933 - compiler-errors:refactor-solver-api, r=lcnrGuillaume Gomez-68/+41
Simplify root goal API of solver a bit Root goal API is more easily distinguished between proof tree and non-proof tree, rather than `eval_goal` vs `eval_goal_raw`. r? lcnr
2025-06-24Rollup merge of #142932 - Enselic:keep-empty-generic-params, r=aDotInTheVoidGuillaume Gomez-13/+19
rustdoc-json: Keep empty generic args if parenthesized Because in the case of for example pub fn my_fn3(f: impl FnMut()) {} we want to keep `()` even if it is empty since that matches e.g. Rust syntax requirements. This is an amendment to https://github.com/rust-lang/rust/pull/142502, so: r? ``@aDotInTheVoid`` cc ``@nnethercote`` cc https://github.com/cargo-public-api/cargo-public-api/pull/798
2025-06-24Rollup merge of #142928 - Noratrieb:no-more-hang, r=clubby789Guillaume Gomez-0/+6
Fix hang in --print=file-names in bootstrap In an interactive context, the subprocess inherited a real tty stdin, which lead it it waiting for something to happen, even though nothing happened. By explicitly passing null as stdin we make sure an empty file is passed, which achieves the desired behavior. Fixes rust-lang/rust#142926 (verified locally by cherry-picking the patch onto beta where I was building).
2025-06-24Rollup merge of #142894 - pthariensflame:patch-1, r=jhprattGuillaume Gomez-1/+1
phantom_variance_markers: fix identifier usage in macro This shouldn't have worked originally, as far as we can tell. Fixes an implementation detail of rust-lang/rust#135806.
2025-06-24Rollup merge of #142779 - Erk-:fix/core/142734, r=jhprattGuillaume Gomez-0/+6
Add note about `str::split` handling of no matches. Adds small note and example to the test for a non matching pattern resolves rust-lang/rust#142734
2025-06-24Rollup merge of #142695 - ↵Guillaume Gomez-41/+246
GrigorenkoPV:attributes/rustc_skip_during_method_dispatch, r=jdonszelmann Port `#[rustc_skip_during_method_dispatch]` to the new attribute system Part of rust-lang/rust#131229 r? ``@jdonszelmann``
2025-06-24Rollup merge of #142354 - gstjepan2:firefox_copy_paste_issue, r=GuillaumeGomezGuillaume Gomez-1/+29
Fixes firefox copy paste issue
2025-06-24Rollup merge of #140622 - petrochenkov:annusexp, r=jieyouxuGuillaume Gomez-111/+297
compiletest: Improve diagnostics for line annotation mismatches When some line annotations are missing or misplaced, compiletest reports an error, but the error is not very convenient. This PR attempts to improve the user experience. - The "expected ... not found" messages are no longer duplicated. - The `proc_res.status` and `proc_res.cmdline` message is no longer put in the middle of other messages describing the annotation mismatches, it's now put into the end. - Compiletest now makes suggestions if there are fuzzy matches between expected and actually reported errors (e.g. the annotation is put on a wrong line). - Missing diagnostic kinds are no longer produce an error eagerly, but instead treated as always mismatching kinds, so they can produce suggestions telling the right kind. I'll post screenshots in the thread below, but the behavior shown on the screenshots can be reproduced locally using the new test `tests/ui/compiletest-self-test/line-annotation-mismatches.rs`. This also fixes https://github.com/rust-lang/rust/issues/140940. r? ``@jieyouxu``
2025-06-24Rollup merge of #140005 - mlowicki:patch-1, r=tgross35Guillaume Gomez-1/+36
Set MSG_NOSIGNAL for UnixStream https://github.com/rust-lang/rust/issues/139956 Same logic as for https://github.com/rust-lang/rust/blob/1f76d219c906f0112bb1872f33aa977164c53fa6/library/std/src/sys/net/connection/socket.rs#L399-L405.
2025-06-24Fix a bunch of missing unwinder related definitionsbjorn3-2/+16
cg_llvm likely just optimizes out their references for these tests, but cg_clif doesn't and would thus give a linker error.
2025-06-24Fix function signature for rust_eh_personalitybjorn3-7/+59
While cg_llvm is very lax about mismatched function signatures, cg_clif will crash when there is any mismatch. It could be turned into an error, but without Cranelift changes can't just be ignored.
2025-06-24Fix normalization in linker-warningbjorn3-15/+2
Ensure rustc_codegen_cranelift doesn't get normalized to rustc. And handle -Cpanic=abort.
2025-06-24mbe: Use `TokenTree` as the fallback for invalid fragment specifiersTrevor Gross-3/+3
`tt` should match more, so use this for both missing and invalid fragment specifiers. Also remove one unneeded instance of `String`.
2025-06-24mbe: Clean up code with non-optional `NonterminalKind`Trevor Gross-111/+158
Since [1], 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. [1]: https://github.com/rust-lang/rust/pull/128425
2025-06-24mbe: Unnest nested matches with let-else and let chainsTrevor Gross-58/+63
Non-functional change to simplify control flow.
2025-06-24Merge pull request #20012 from lnicola/bump-literal-escaperLukas Wirth-169/+139
Update to literal-escaper 0.0.4
2025-06-24Merge pull request #20080 from Veykril/push-vnrwqppplykmLukas Wirth-39/+60
Cleanup `folding_ranges` and support more things
2025-06-24Cleanup `folding_ranges` and support more thingsLukas Wirth-39/+60
2025-06-24Merge pull request #20061 from ChayimFriedman2/wrap-ret-tyLukas Wirth-34/+133
fix: In "Wrap return type" assist, don't wrap exit points if they already have the right type
2025-06-24Merge pull request #20064 from Wilfred/document_sysroot_projectLukas Wirth-0/+3
Document sysroot_project field in rust-project.json
2025-06-24Auto merge of #142930 - cuviper:normalize-beta-versions, r=workingjubileebors-8/+8
Account for beta revisions when normalizing versions Several UI tests have a `normalize-stderr` for "you are using x.y.z" rustc versions, and that regex is flexible enough for suffixes like "-nightly" and "-dev", but not for "-beta.N". We can just add '.' to that trailing pattern to include this.
2025-06-24Merge pull request #20036 from Veykril/push-yquvoyrxkksxLukas Wirth-70/+70
Do not default to 'static for trait object lifetimes
2025-06-24Do not default to 'static for trait object lifetimesLukas Wirth-70/+70
We lack trait object default lifetime elision, so `'static` can be wrong at times, confusing the user
2025-06-24Merge pull request #20062 from ChayimFriedman2/doctestsLukas Wirth-0/+32
minor: Don't run doctests
2025-06-24Add change tracker entryJakub Beránek-0/+5
2025-06-24Merge pull request #20072 from Veykril/push-sorvvvzskywvLukas Wirth-10/+44
fix: Respect `.cargo/config.toml` `build.target-dir`
2025-06-24Update test.Camille GILLOT-1/+2
2025-06-24Tweak `-Zinput-stats` and `-Zmeta-stats` output.Nicholas Nethercote-13/+17
To make it match `-Zmacro-stats`, and work better if you have enabled it for multiple crates. - Print each crate's name. - Print a `===` banner at the start and end for separation.
2025-06-24Reverse order of `-Zinput-stats` and `-Zmeta-stats` output.Nicholas Nethercote-93/+95
Currently they have the largest items at the end. I believe the rationale is that it saves you scrolling up through terminal output because the important stuff is at the bottom. But it's also surprising and a bit confusing, and I think the obvious order (big things at the top) is better.
2025-06-24Make stats code nicer.Nicholas Nethercote-30/+62
Taking inspiration from `-Zmacro-stats`: - Use "{prefix}" consistently. - Use names for column widths. - Write output in a single `eprint!` call, in an attempt to minimize interleaving of output from different rustc processes. - Use `repeat` for the long `---` banners.
2025-06-24Apply fast path to old solver tooMichael Goulet-2/+10
2025-06-24Introduce trivial WF functions, use it in fast pathMichael Goulet-1/+84
2025-06-24Auto merge of #142929 - workingjubilee:rollup-4p3ypz1, r=workingjubileebors-2860/+1665
Rollup of 9 pull requests Successful merges: - rust-lang/rust#140985 (Change `core::iter::Fuse`'s `Default` impl to do what its docs say it does) - rust-lang/rust#141324 (std: sys: random: uefi: Provide rdrand based fallback) - rust-lang/rust#142134 (Reject unsupported `extern "{abi}"`s consistently in all positions) - rust-lang/rust#142784 (Add codegen timing section) - rust-lang/rust#142827 (Move error code explanation removal check into tidy) - rust-lang/rust#142873 (Don't suggest changing a method inside a expansion) - rust-lang/rust#142908 (Fix install-template.sh for Solaris tr) - rust-lang/rust#142922 (Fix comment on NoMangle) - rust-lang/rust#142923 (fix `-Zmin-function-alignment` on functions without attributes) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-24Tweak `-Zmacro-stats` measurement.Nicholas Nethercote-43/+35
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.
2025-06-23Simplify API of solver a bitMichael Goulet-68/+41