about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-02-09Emit an error if `-Zdwarf-version=1` is requestedWesley Wiser-2/+61
DWARF 1 is very different than DWARF 2+ (see the commentary in https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#index-gdwarf) and LLVM does not really seem to support DWARF 1 as Clang does not offer a `-gdwarf-1` flag and `llc` will just generate DWARF 2 with the version set to 1: https://godbolt.org/z/s85d87n3a. Since this isn't actually supported (and it's not clear it would be useful anyway), report that DWARF 1 is not supported if it is requested. Also add a help message to the error saying which versions are supported.
2025-02-08Auto merge of #136728 - matthiaskrgr:rollup-x2qh9yt, r=matthiaskrgrbors-51/+70
Rollup of 6 pull requests Successful merges: - #136640 (Debuginfo for function ZSTs should have alignment of 8 bits, not 1 bit) - #136648 (Add a missing `//@ needs-symlink` to `tests/run-make/libs-through-symlinks`) - #136651 (Label mismatched parameters at the def site for foreign functions) - #136691 (Remove Linkage::Private and Linkage::Appending) - #136692 (add module level doc for bootstrap:utils:exec) - #136700 (i686-unknown-hurd-gnu: bump baseline CPU to Pentium 4) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-08Auto merge of #136725 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 14 commits in 0e3d73849ab8cbbab3ec5c65cbd555586cb21339..2928e32734b04925ee51e1ae88bea9a83d2fd451 2025-02-01 20:14:40 +0000 to 2025-02-07 16:50:22 +0000 - Simplify backtrack (rust-lang/cargo#15150) - Don't use on Solaris libc::LOCK_* which were removed from libc in ver… (rust-lang/cargo#15143) - feat: emit error if package not found within workspace (rust-lang/cargo#15071) - Make cache tracking resilient to unexpected files (rust-lang/cargo#15147) - Small resolver cleanups (rust-lang/cargo#15040) - feat: add `cargo pkgid` support for cargo-script (rust-lang/cargo#14961) - Suggest similar feature names on CLI (rust-lang/cargo#15133) - fix: Don't use "did you mean" in errors (rust-lang/cargo#15138) - Fix changelog link (rust-lang/cargo#15142) - chore(deps): update rust crate rand to 0.9.0 (rust-lang/cargo#15129) - Remove the original changelog (rust-lang/cargo#15123) - chore(deps): update rust crate gix to 0.70.0 (rust-lang/cargo#15128) - allow windows reserved names in CI (rust-lang/cargo#15135) - removed a word that was repeated (rust-lang/cargo#15136)
2025-02-08Rollup merge of #136700 - RalfJung:hurd, r=NoratriebMatthias Krüger-2/+2
i686-unknown-hurd-gnu: bump baseline CPU to Pentium 4 See https://github.com/rust-lang/rust/issues/136495 for context. ``@sthibaul`` (the only listed target maintainer) said they would be [fine](https://github.com/rust-lang/rust/issues/136495#issuecomment-2638355845) with this change.
2025-02-08Rollup merge of #136692 - ↵Matthias Krüger-0/+5
Shourya742:2025-02-07-add-rust-docs-for-bootstrap-utils-exec, r=onur-ozkan add module level doc for bootstrap:utils:exec This PR adds module level doc for bootstrap utils/exec module
2025-02-08Rollup merge of #136691 - bjorn3:linkage_cleanup, r=jieyouxuMatthias Krüger-26/+4
Remove Linkage::Private and Linkage::Appending Neither of them has any use case. Neither known nor theoretical.
2025-02-08Rollup merge of #136651 - Jarcho:fn_ctxt3, r=compiler-errorsMatthias Krüger-12/+48
Label mismatched parameters at the def site for foreign functions Nice and simple. Adds parameter marking for the only missing definition type. r? ``@compiler-errors``
2025-02-08Rollup merge of #136648 - jieyouxu:missing-needs-symlink, r=wesleywiserMatthias Krüger-0/+1
Add a missing `//@ needs-symlink` to `tests/run-make/libs-through-symlinks` r? ``@wesleywiser`` (since you [found it](https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202025-02-06/near/498173394) :P or reroll)
2025-02-08Rollup merge of #136640 - Zalathar:debuginfo-align-bits, r=compiler-errorsMatthias Krüger-11/+10
Debuginfo for function ZSTs should have alignment of 8 bits, not 1 bit In #116096, function ZSTs were made to have debuginfo that gives them an alignment of “1”. But because alignment in LLVM debuginfo is denoted in *bits*, not bytes, this resulted in an alignment specification of 1 bit instead of 1 byte. I don't know whether this has any practical consequences, but I noticed that a test started failing when I accidentally fixed the mistake while working on #136632, so I extracted the fix (and the test adjustment) to this PR.
2025-02-08Auto merge of #136713 - matthiaskrgr:rollup-sy6py39, r=matthiaskrgrbors-234/+722
Rollup of 7 pull requests Successful merges: - #135179 (Make sure to use `Receiver` trait when extracting object method candidate) - #136554 (Add `opt_alias_variances` and use it in outlives code) - #136556 ([AIX] Update tests/ui/wait-forked-but-failed-child.rs to accomodate exiting and idle processes.) - #136589 (Enable "jump to def" feature on rustc docs) - #136615 (sys: net: Add UEFI stubs) - #136635 (Remove outdated `base_port` calculation in std net test) - #136682 (Move two windows process tests to tests/ui) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-07Update cargoWeihang Lo-0/+0
2025-02-08Auto merge of #136588 - ChrisDenton:no-msys2, r=Kobzolbors-19/+0
Don't install msys2 in CI windows-msvc doesn't need it and windows-gnu [installs its own version](https://github.com/rust-lang/rust/blob/master/src/ci/scripts/install-mingw.sh) try-job: dist-x86_64-msvc try-job: dist-i686-msvc try-job: dist-aarch64-msvc try-job: dist-i686-mingw try-job: dist-x86_64-mingw try-job: dist-x86_64-msvc-alt
2025-02-07Rollup merge of #136682 - ChrisDenton:move-win-proc-tests, r=joboetMatthias Krüger-148/+169
Move two windows process tests to tests/ui Spawning processes from std unit tests is not something it's well suited for so moving them into tests/ui is more robust and means we don't need to hack around `cmd.exe`. Follow up to #136630
2025-02-07Rollup merge of #136635 - jieyouxu:base_port, r=joboetMatthias Krüger-30/+3
Remove outdated `base_port` calculation in std net test This was never modified since `std::net` was originally introduced in 395709ca6d39ba1e095e404e1d2a169d918b7f0c, when at that time, each CI runner was running multiple jobs concurrently. This seems to have originally caused issues with jobs fighting over the same ports. This is not the case in the current CI infrastructure, so remove this relic in favor of a simple constant base port number. I double-checked `19600` and nearby port numbers, and this isn't a well-known port number AFAICT[^1]. Closes #136633. [^1]: At the time of writing.
2025-02-07Rollup merge of #136615 - Ayush1325:uefi-net-unsupported, r=joboetMatthias Krüger-0/+374
sys: net: Add UEFI stubs - Just a copy of sys/net/unsupported. - Will make the future net PRs easier to review. - The reason for a separate folder instead of standalone file is that UEFI has separate the protocols for v4 and v6, and thus will need some abstractions to implement the Rust interface. r? ``@jhpratt``
2025-02-07Rollup merge of #136589 - GuillaumeGomez:enable-jump-to-def-compiler, r=oli-obkMatthias Krüger-2/+5
Enable "jump to def" feature on rustc docs This PR enables the rustdoc "jump to def" feature which is visible on the source code pages. r? ``@oli-obk``
2025-02-07Rollup merge of #136556 - ↵Matthias Krüger-1/+10
amy-kwan:amy-kwan/update_wait-forked-but-failed-child.rs, r=joboet [AIX] Update tests/ui/wait-forked-but-failed-child.rs to accomodate exiting and idle processes. The `wait-forked-but-failed-child.rs` test expects to see an integer PPID in the output of the command: `ps -A -o pid,ppid,args`. However, on AIX, sometimes an integer PPID is not available when a process is either exiting or idle, as documented in https://www.ibm.com/docs/en/aix/7.3?topic=p-ps-command. In these situations, a `-` is instead shown in the PPID column of the `ps` output. This PR updates the test to accommodate this behaviour on AIX by first filtering out the lines of the `ps` output where a `-` is found in the `PPID` column.
2025-02-07Rollup merge of #136554 - compiler-errors:opt-alias-variances, r=lcnrMatthias Krüger-50/+117
Add `opt_alias_variances` and use it in outlives code ...so to fix some subtle outlives bugs with precise capturing in traits, and eventually make it easier to compute variances for "forced unconstrained" trait lifetimes. r? lcnr
2025-02-07Rollup merge of #135179 - compiler-errors:arbitrary-self-types-object, r=BoxyUwUMatthias Krüger-3/+44
Make sure to use `Receiver` trait when extracting object method candidate In method confirmation, the `extract_existential_trait_ref` function re-extracts the object type by derefing until it reaches an object. If we're assembling methods via the `Receiver` trait, make sure we re-do our work also using the receiver trait. Fixes #135155 cc ``@adetaylor``
2025-02-07Auto merge of #136697 - matthiaskrgr:rollup-eww4vl9, r=matthiaskrgrbors-953/+1387
Rollup of 7 pull requests Successful merges: - #134367 (Stabilize `feature(trait_upcasting)`) - #135940 (Update toolstate maintainers) - #135945 (Remove some unnecessary parens in `assert!` conditions) - #136577 (Pattern Migration 2024: try to suggest eliding redundant binding modifiers) - #136598 (Fix suggestion for `dependency_on_unit_never_type_fallback` involving closures + format args expansions) - #136653 (Remove dead code from rustc_codegen_llvm and the LLVM wrapper) - #136664 (replace one `.map_or(true, ...)` with `.is_none_or(...)`) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-07i686-unknown-hurd-gnu: bump baseline CPU to Pentium 4Ralf Jung-2/+2
2025-02-07Rollup merge of #136664 - WaffleLapkin:un-map_or-true, r=compiler-errorsMatthias Krüger-1/+1
replace one `.map_or(true, ...)` with `.is_none_or(...)` Randomly found while going through some of my old branches.
2025-02-07Rollup merge of #136653 - dpaoliello:cleanllvm1, r=ZalatharMatthias Krüger-60/+0
Remove dead code from rustc_codegen_llvm and the LLVM wrapper First step to clean up the LLVM wrapper: remove existing dead code. Split out of #135502 r? ``@Zalathar``
2025-02-07Rollup merge of #136598 - compiler-errors:unit-fallback, r=WaffleLapkinMatthias Krüger-10/+62
Fix suggestion for `dependency_on_unit_never_type_fallback` involving closures + format args expansions fixes #136562 r? wafflelapkin or reassign
2025-02-07Rollup merge of #136577 - dianne:simple-pat-migration-simplification, ↵Matthias Krüger-262/+1043
r=Nadrieril Pattern Migration 2024: try to suggest eliding redundant binding modifiers This is based on #136475. Only the last commit is new. This is a simpler, more restrictive alternative to #136496, meant to partially address #136047. If a pattern can be migrated to Rust 2024 solely by removing redundant binding modifiers, this will make that suggestion; otherwise, it uses the old suggestion of making the pattern fully explicit. Relevant tracking issue: #131414 ``@rustbot`` label A-diagnostics A-patterns A-edition-2024 r? ``@Nadrieril``
2025-02-07Rollup merge of #135945 - estebank:useless-parens, r=compiler-errorsMatthias Krüger-133/+130
Remove some unnecessary parens in `assert!` conditions While working on #122661, some of these started triggering our "unnecessary parens" lints due to a change in the `assert!` desugaring. A cursory search identified a few more. Some of these have been carried from before 1.0, were a bulk rename from the previous name of `assert!` left them in that state. I went and removed as many of these unnecessary parens as possible in order to have fewer annoyances in the future if we make the lint smarter.
2025-02-07Rollup merge of #135940 - ehuss:toolstate-update, r=Mark-SimulacrumMatthias Krüger-8/+11
Update toolstate maintainers This updates the toolstate maintainers to more closely match who is still active.
2025-02-07Rollup merge of #134367 - WaffleLapkin:trait_upcasting_as_a_treat, ↵Matthias Krüger-479/+140
r=compiler-errors Stabilize `feature(trait_upcasting)` This feature was "done" for a while now, I think it's finally time to stabilize it! Stabilization report: https://github.com/rust-lang/rust/pull/134367#issuecomment-2545839841. cc reference PR: https://github.com/rust-lang/reference/pull/1622. Closes #65991 (tracking issue), closes #89460 (the lint is no longer future incompat). r? compiler-errors
2025-02-07Remove Linkage::Appendingbjorn3-7/+0
It can only be used for certain LLVM internal variables like llvm.global_ctors which users are not allowed to define.
2025-02-07Remove Linkage::Privatebjorn3-19/+4
This is the same as Linkage::Internal except that it doesn't emit any symbol. Some backends may not support it and it isn't all that useful anyway.
2025-02-07add module level doc for bootstrap:util:execbit-aloo-0/+5
2025-02-07Auto merge of #136684 - matthiaskrgr:rollup-mlpzre5, r=matthiaskrgrbors-259/+369
Rollup of 8 pull requests Successful merges: - #135973 (fix tail call checks wrt `#[track_caller]`) - #136191 (compiler: replace few consts arrays with statics to remove const dupes) - #136565 (compiler: Clean up weird `rustc_abi` reexports) - #136582 (Revert "CI: build FreeBSD artifacts on FreeBSD 13.4") - #136627 (MIR validation: add comment explaining the limitations of CfgChecker) - #136634 (Stabilise `Cursor::{get_mut, set_position}` in `const` scenarios.) - #136643 (ping me for attribute-related changes) - #136644 (Add `rustc_hir_pretty::item_to_string` function) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-07Rollup merge of #136644 - GuillaumeGomez:item-to-string, r=UrgauMatthias Krüger-0/+4
Add `rustc_hir_pretty::item_to_string` function Another one needed for rustdoc. :) r? `@Urgau`
2025-02-07Rollup merge of #136643 - jdonszelmann:add-triagebot-attrs, r=fmeaseMatthias Krüger-0/+20
ping me for attribute-related changes r? `@fmease`
2025-02-07Rollup merge of #136634 - bjoernager:const-mut-cursor, r=m-ou-seMatthias Krüger-2/+2
Stabilise `Cursor::{get_mut, set_position}` in `const` scenarios. Closes: #130801 This PR stabilises the `const_mut_cursor` feature gate.
2025-02-07Rollup merge of #136627 - RalfJung:mir-validation-cfg-checker, r=compiler-errorsMatthias Krüger-0/+6
MIR validation: add comment explaining the limitations of CfgChecker I hope this right but I am not sure.^^ Cc `@compiler-errors` `@lcnr` `@cjgillot` `@oli-obk`
2025-02-07Rollup merge of #136582 - asomers:revert-132232, r=tgross35Matthias Krüger-9/+9
Revert "CI: build FreeBSD artifacts on FreeBSD 13.4" This reverts commit cf34545720986d99712e3b542e8f395360c75095. That commit led to a regression of https://github.com/rust-lang/rust/issues/132185 . So my analysis that the problem lay in FreeBSD 13.2's specific LLVM version was clearly wrong. Revert that commit until we can figure out the real root cause. Fixes #132185 try-job: dist-x86_64-freebsd try-job: dist-various-2
2025-02-07Rollup merge of #136565 - workingjubilee:fixup-abi-in-target, r=compiler-errorsMatthias Krüger-199/+221
compiler: Clean up weird `rustc_abi` reexports Just general cleanup in `rustc_target` and `rustc_abi`. I was originally going to make a PR with a larger change that also fixed the last few crates and in doing so removed some clutter from `rustc_abi`, but wound up slightly stuck on it, then figured out how to fix it, and then got distracted by other things... so now I'm trying to figure out what I had figured out earlier.
2025-02-07Rollup merge of #136191 - klensy:const_a, r=compiler-errorsMatthias Krüger-15/+15
compiler: replace few consts arrays with statics to remove const dupes Locally on `x86_64-pc-windows-msvc` -100kb for `rustc_driver.dll`
2025-02-07Rollup merge of #135973 - WaffleLapkin:tail-track-caller-fix, r=compiler-errorsMatthias Krüger-34/+92
fix tail call checks wrt `#[track_caller]` Only check the caller + disallow caller having the attribute. fixes #134336 r? `@compiler-errors` <sub>apparently there were no tests for `#[track_caller]` before... ooops</sub>
2025-02-07Auto merge of #136647 - marcoieni:ubuntu-22-free-runner-arm, r=Kobzolbors-1/+1
ci: use ubuntu 22 for free arm runners try-job: aarch64-gnu try-job: aarch64-gnu-debug
2025-02-07Move two windows process tests to tests/uiChris Denton-148/+169
2025-02-07Auto merge of #136450 - compiler-errors:simplify-cast, r=saethlinbors-9/+294
Don't reset cast kind without also updating the operand in `simplify_cast` in GVN Consider this heavily elided segment of the pre-GVN example code that was committed as a test: ```rust let _4: *const (); let _5: *const [()]; let mut _6: *const (); let _7: *mut (); let mut _8: *const [()]; let mut _9: std::boxed::Box<()>; let mut _10: *const (); /* ... */ // Deref a box _10 = copy ((_9.0: std::ptr::Unique<()>).0: std::ptr::NonNull<()>) as *const () (Transmute); _4 = copy _10; _6 = copy _4; // Inlined body of `slice::from_raw_parts`, to turn a unit pointer into a slice-of-unit pointer _5 = *const [()] from (copy _6, copy _11); _8 = copy _5; // Cast the raw slice-of-unit pointer back to a unit pointer _7 = copy _8 as *mut () (PtrToPtr); ``` A malformed optimization was changing `_7` (which casted the slice-of-unit ptr to a unit ptr) to: ``` _7 = copy _5 as *mut () (Transmute); ``` ...where `_8` was just replaced with `_5` bc of simple copy propagation, that part is not important... the CastKind changing to Transmute is the important part here. In #133324, two new functionalities were implemented: * Peeking through unsized -> sized PtrToPtr casts whose operand is `AggregateKind::RawPtr`, to turn it into PtrToPtr casts of the base of the aggregate. In this case, this allows us to see that the value of `_7` is just a ptr-to-ptr cast of `_6`. * Folding a PtrToPtr cast of an operand which is a Transmute cast into just a single Transmute, which (theoretically) allows us to treat `_7` as a transmute into `*mut ()` of the base of the cast of `_10`, which is the place projection of `((_9.0: std::ptr::Unique<()>).0: std::ptr::NonNull<()>)`. However, when applying those two subsequent optimizations, we must *not* update the CastKind of the final cast *unless* we also update the operand of the cast, since the operand may no longer make sense with the updated CastKind. In this case, this is problematic because the type of `_8` is `*const [()]`, but that operand in assignment statement of `_7` does *not* get turned into something like `((_9.0: std::ptr::Unique<()>).0: std::ptr::NonNull<()>)` -- **in other words, `try_to_operand` fails** -- because GVN only turns value nodes into locals or consts, not projections of locals. So we fail to update the operand, but we still update the CastKind to Transmute, which means we now are transmuting types of different sizes (a wide pointer and a thin pointer). r? `@scottmcm` or `@cjgillot` Fixes #136361 Fixes #135997
2025-02-07Auto merge of #136658 - matthiaskrgr:rollup-tg1vmex, r=matthiaskrgrbors-721/+2883
Rollup of 7 pull requests Successful merges: - #133925 (disallow `repr()` on invalid items) - #136069 (Simplify slice indexing in next trait solver) - #136152 (Stabilize `map_many_mut` feature) - #136219 (Misc. `rustc_hir` cleanups 🧹) - #136580 (Couple of changes to run rustc in miri) - #136636 (Couple of minor cleanups to the diagnostic infrastructure) - #136645 (Clippy subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-06Remove dead code from rustc_codegen_llvm and the LLVM wrapperDaniel Paoliello-60/+0
2025-02-06allow+update `deref_into_dyn_supertrait`Waffle Lapkin-75/+63
this commit makes `deref_into_dyn_supertrait` lint allow-by-default, removes future incompatibility (we finally live in a broken world), and changes the wording in the documentation. previously documentation erroneously said that it lints against *usage* of the deref impl, while it actually (since 104742) lints on the impl itself (oooops, my oversight, should have updated it 2+ years ago...)
2025-02-06adjust a commentWaffle Lapkin-3/+1
We can't remove `TraitUpcasting` variant, since we need to use the index in winnowing.
2025-02-06remove use of `feature(trait_upcasting)` from miriWaffle Lapkin-9/+2
2025-02-06remove use of `feature(trait_upcasting)` from core testsWaffle Lapkin-1/+0
2025-02-06remove unstable book entry for `feature(trait_upcasting)`Waffle Lapkin-26/+0