about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-02-07Add comment for regression #136223 on borrowck-errors.rsShunpoco-5/+7
Signed-off-by: Shunpoco <tkngsnsk313320@gmail.com>
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-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-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-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
2025-02-06remove `feature(trait_upcasting)` from tests and bless themWaffle Lapkin-275/+67
2025-02-06change `deref_into_dyn_supertrait` lint wordingWaffle Lapkin-5/+6
(so that it doesn't talk about trait upcasting stabilization in the future tense)
2025-02-06stabilize `feature(trait_upcasting)`Waffle Lapkin-90/+6
2025-02-06Remove some unnecessary parens in `assert!` conditionsEsteban Küber-133/+130
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-06replace one `.map_or(true, ...)` with `.is_none_or(...)`Waffle Lapkin-1/+1
2025-02-06Rollup merge of #136645 - flip1995:clippy-subtree-update, r=ManishearthMatthias Krüger-565/+2680
Clippy subtree update r? `@Manishearth`
2025-02-06Rollup merge of #136636 - bjorn3:error_cleanup, r=compiler-errorsMatthias Krüger-22/+12
Couple of minor cleanups to the diagnostic infrastructure
2025-02-06Rollup merge of #136580 - bjorn3:miri_fixes, r=lqdMatthias Krüger-12/+24
Couple of changes to run rustc in miri This is not the full set of patches required to run rustc in miri, but it is the fast majority of the changes to rustc itself. There is also a change to the jobserver crate necessary and on arm64 a change to the memchr crate. Running rustc in miri has already found some UB: https://github.com/rust-lang/rust/pull/136579 cc https://github.com/rust-lang/rust/issues/135870#issuecomment-2612470540
2025-02-06Rollup merge of #136219 - yotamofek:pr/hir-cleanup, r=compiler-errorsMatthias Krüger-56/+37
Misc. `rustc_hir` cleanups 🧹 Each commit stands on its own, but I think all of them make the code a bit cleaner
2025-02-06Rollup merge of #136152 - Urgau:stabilize-map_many_mut, r=joshtriplettMatthias Krüger-17/+18
Stabilize `map_many_mut` feature This PR stabilize `HashMap::get_many_mut` as `HashMap::get_disjoint_mut` and `HashMap::get_many_unchecked_mut` as `HashMap::get_disjoint_unchecked_mut` per FCP. FCP at https://github.com/rust-lang/rust/issues/97601#issuecomment-2532710423 Fixes #97601 r? libs
2025-02-06Rollup merge of #136069 - yotamofek:next-solver-slice, r=compiler-errorsMatthias Krüger-7/+5
Simplify slice indexing in next trait solver Unless I'm missing something: - no need to explicitly specify the end of the slice as the end of the index range - the `assert` is redundant since the indexing will panic for the same condition I think this change simplifies it a bit. Also replaced the `for` loop of `push`es with a call to `extend` with an iterator. Might improve performance since it knows how many elements will be added beforehand and can pre-reserve room? r? `@compiler-errors` , I think
2025-02-06Rollup merge of #133925 - folkertdev:improve-repr-warnings, r=compiler-errorsMatthias Krüger-42/+107
disallow `repr()` on invalid items fixes https://github.com/rust-lang/rust/issues/129606 fixes https://github.com/rust-lang/rust/issues/132391 Disallows `repr()` (so a repr with no arguments) on items where that won't ever make sense. Also this generates an error when `repr` is used on a trait method and the `fn_align` feature is not enabled. Looks like that was missed here: https://github.com/rust-lang/rust/pull/110313/files Which first accepts the align attribute on trait methods. r? `@compiler-errors` cc `@jdonszelmann` who claimed https://github.com/rust-lang/rust/issues/132391 and generally has been working on attributes
2025-02-06fix tail call checks wrt `#[track_caller]`Waffle Lapkin-34/+92
only check the caller + disallow caller having the attr.
2025-02-06Don't reset cast kind without also updating the operand in simplify_castMichael Goulet-13/+15
2025-02-06Failing testMichael Goulet-0/+283
2025-02-06Stop passing the same resource multiple times when building ParseSessbjorn3-5/+3
2025-02-06Avoid manually producing FatalError in a couple of placesbjorn3-3/+3
2025-02-06Construct DiagCtxt a bit earlier in build_sessionbjorn3-14/+6
2025-02-06Auto merge of #136641 - matthiaskrgr:rollup-lajwje5, r=matthiaskrgrbors-349/+524
Rollup of 7 pull requests Successful merges: - #136073 (Always compute coroutine layout for eagerly emitting recursive layout errors) - #136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern) - #136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types) - #136315 (Use short ty string for binop and unop errors) - #136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns) - #136435 (Simplify some code for lowering THIR patterns) - #136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-gnu-debug
2025-02-06ci: use ubuntu 22 for free arm runnersMarcoIeni-1/+1
2025-02-06Auto merge of #136585 - gvozdvmozgu:memchr-eat-until-lexer, r=lcnrbors-2/+11
implement `eat_until` leveraging memchr in lexer
2025-02-06Merge commit '3e3715c31236bff56f1c63a1de2c7bbdfcfb0923' into ↵Philipp Krones-565/+2680
clippy-subtree-update
2025-02-06Rustup (#14163)Philipp Krones-464/+597
r? @ghost changelog: none