about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-05-28get rid of rustc_codegen_ssa::common::AtomicOrderingRalf Jung-42/+23
2025-05-28atomic_load intrinsic: use const generic parameter for orderingRalf Jung-74/+198
2025-05-28Remove unused arg_memory_ty methodbjorn3-26/+3
2025-05-28Mark all optimize methods and the codegen method as safebjorn3-34/+25
There is no safety contract and I don't think any of them can actually cause UB in more ways than passing malicious source code to rustc can. While LtoModuleCodegen::optimize says that the returned ModuleCodegen points into the LTO module, the LTO module has already been dropped by the time this function returns, so if the returned ModuleCodegen indeed points into the LTO module, we would have seen crashes on every LTO compilation, which we don't. As such the comment is outdated.
2025-05-28Remove methods from StaticCodegenMethods that are not called in cg_ssa itselfbjorn3-37/+16
2025-05-28Make predefine methods take &mut selfbjorn3-10/+10
2025-05-28Move supports_parallel from CodegenBackend to ExtraBackendMethodsbjorn3-8/+8
It is only relevant when using cg_ssa for driving compilation.
2025-05-28Remove a couple of uses of interior mutability around staticsbjorn3-28/+33
2025-05-28Reduce amount of types that need to be PartialEqbjorn3-3/+3
2025-05-28The personality function is a Function, not a Valuebjorn3-4/+4
2025-05-28Remove codegen_unit from MiscCodegenMethodsbjorn3-42/+29
2025-05-28Remove checks that are run with `tidy`Guillaume Gomez-3/+0
2025-05-28Add `eslint` as part of tidy runGuillaume Gomez-0/+94
2025-05-28Add eholk to compiler reviewer rotationEric Holk-0/+1
Now that we have work queue limits on triagebot, I'm happy to share some of the review load.
2025-05-28Auto merge of #141696 - tgross35:rollup-fhpj180, r=tgross35bors-575/+907
Rollup of 7 pull requests Successful merges: - rust-lang/rust#140369 (Add data_ptr method to Mutex and RwLock) - rust-lang/rust#140697 (Split `autodiff` into `autodiff_forward` and `autodiff_reverse`) - rust-lang/rust#141404 (Improve intrinsic handling in cg_ssa) - rust-lang/rust#141411 (rustdoc: linking to a local proc macro no longer warns) - rust-lang/rust#141548 (consider glob imports in cfg suggestion) - rust-lang/rust#141627 (Drop-build cleanups) - rust-lang/rust#141670 (Fix ICE in tokenstream with contracts from parser recovery) r? `@ghost` `@rustbot` modify labels: rollup
2025-05-28Add comments to diagnostic itemsPatrick-6-0/+6
2025-05-28Add cfg for FormatShortCmdMu001999-0/+3
2025-05-28Rollup merge of #141670 - chenyukang:yukang-fix-ice-from-contracts, ↵Trevor Gross-26/+60
r=nnethercote Fix ICE in tokenstream with contracts from parser recovery Fixes rust-lang/rust#140683 After two times of parsing error, the `recover_stmt_` constructs an error ast, then when we expand macors, the invalid tokenstream triggered ICE because of mismatched delims. Expected `{` and get other tokens is an obvious error message, too much effort on recovery may introduce noise. r? ```@nnethercote```
2025-05-28Rollup merge of #141627 - nnethercote:drop-cleanups, r=matthewjasperTrevor Gross-53/+59
Drop-build cleanups Some cleanups I made while trying to speed up the program in rust-lang/rust#134404. r? ```@matthewjasper```
2025-05-28Rollup merge of #141548 - bvanjoi:issue-141256, r=petrochenkovTrevor Gross-5/+200
consider glob imports in cfg suggestion Fixes rust-lang/rust#141256 r? ```@petrochenkov```
2025-05-28Rollup merge of #141411 - lolbinarycat:rustdoc-link-proc-macro-91274, ↵Trevor Gross-8/+84
r=GuillaumeGomez rustdoc: linking to a local proc macro no longer warns fixes https://github.com/rust-lang/rust/issues/91274 tried to keep the fix general in case we ever have any other kind of item that occupies multiple namespaces simultaniously.
2025-05-28Rollup merge of #141404 - bjorn3:refactor_cg_ssa_call_codegen, r=davidtwcoTrevor Gross-266/+237
Improve intrinsic handling in cg_ssa * Move all intrinsic handling code to the start of `codegen_call_terminator`. * Push some intrinsic handling code into `codegen_intrinsic_call`. * Don't depend on FnAbi for intrinsics.
2025-05-28Rollup merge of #140697 - Sa4dUs:split-autodiff, r=ZuseZ4Trevor Gross-217/+234
Split `autodiff` into `autodiff_forward` and `autodiff_reverse` This PR splits `#[autodiff]` macro so `#[autodiff(df, Reverse, args)]` would become `#[autodiff_reverse(df, args)]` and `#[autodiff(df, Forward, args)]` would become `#[autodiff_forwad(df, args)]`.
2025-05-28Rollup merge of #140369 - jplatte:mutex-rwlock-data-ptr, r=AmanieuTrevor Gross-0/+33
Add data_ptr method to Mutex and RwLock Implementation of https://github.com/rust-lang/rust/issues/140368 / https://github.com/rust-lang/libs-team/issues/531. I tried to write a useful safety section about when it is safe to read or write through the returned pointers, but couldn't come up with something nice. Hoping this PR is still useful without that. I'm happy to add any doc strings other people come up with if needed before merge, of course. Unresolved questions: - Return a `LockResult` or not? - Return `*mut T` like existing APIs (`Cell::as_ptr` / `MaybeUninit::as[_mut]_ptr` / `Vec::as_ptr` / ...) or be more precise and return `NonNull<T>`?
2025-05-28Auto merge of #141576 - marcoieni:pr-free-runners-aarch, r=Kobzolbors-7/+79
ci: move tests from x86_64-gnu-llvm-19 job to aarch64
2025-05-28Stabilise `repr128`beetrees-277/+143
2025-05-28core: unstably expose atomic_compare_exchange so stdarch can use itRalf Jung-1/+4
2025-05-28GCI: Check where-clauses for well-formedness at the def siteLeón Orell Valerian Liehr-8/+55
2025-05-28Make pthread Mutex internals less publicPatrick-6-1/+1
2025-05-28Add diagnostic items to sys::MutexPatrick-6-0/+9
2025-05-28rustbook: Bump versions of `onig` and `onig_sys`Vadim Petrochenkov-5/+5
This fixes the build on GCC 15
2025-05-28Handle e2021 precise capturing of unsafe binderMichael Goulet-2/+9
2025-05-28interpret/allocation: make alloc fn be FnOnceNia Espera-1/+1
2025-05-28replace TraitRef link memory.mdDavid Klank-1/+1
2025-05-28Test(fs): Fix test_eq_windows_file_type for Windows 7Paul Mabileau-1/+23
Would otherwise fail on: ``` thread 'fs::tests::test_eq_windows_file_type' panicked at library/std/src/test_helpers.rs:53:20: called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied." } ``` This came from the read-only attribute set on the test file. In order to fix this, instead of simply disabling the test, the attribute is reset before the test's end so it may still run successfully. Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2025-05-28Use `builin_index` instead of hand-rolling itOli Scherer-21/+11
2025-05-28Merge pull request #19881 from Veykril/push-wsrmttkymypsLukas Wirth-171/+336
feat: Desugar assist for `let pat = expr?;` -> `let else`
2025-05-28feat: Desugar assist for `let pat = expr?;` -> `let else`Lukas Wirth-171/+336
2025-05-28Auto merge of #141501 - marcoieni:dist-x86_64-linux-codebuild-again, r=Kobzolbors-2/+2
ci: move dist-x86_64-linux job to codebuild
2025-05-28Merge pull request #19880 from Veykril/push-xmpxumsrkymkLukas Wirth-31/+97
fix: Handle included files better in IDE layer
2025-05-28Merge pull request #19872 from ChayimFriedman2/async-fn-outputLukas Wirth-11/+81
fix: Fix inference of `AsyncFnX` return type
2025-05-28fix: Handle included files better in IDE layerLukas Wirth-31/+97
This does not fully fix things, but it introduces a function that can be used to fix occurences. When using `to_def` functionality, the input node needs to come from the macro expanded include, not the real file that was included. This does unfortunately add more caller burden, but there is not really a way around it.
2025-05-28ci: verify that codebuild jobs use ghcr.ioMarcoIeni-1/+67
2025-05-28Merge pull request #19876 from ShoyuVanilla/layout-paddingLukas Wirth-23/+272
feat: Render padding information when hovering on structs
2025-05-28float: Disable `total_cmp` sNaN tests for `f16`Trevor Gross-37/+40
There is an LLVM bug with lowering of basic `f16` operations that mean a round trip via `__extendhfsf2` and `__truncsfhf2` may happen for simple `abs` calls or bitcasts [1]. This is problematic because the round trip quiets signaling NaNs. For most operations this is acceptable, but it is causing `total_cmp` tests to fail unless optimizations are enabled. Disable `total_cmp` tests involving signaling NaNs until this issue is resolved. Fixes: https://github.com/rust-lang/rustc_codegen_cranelift/issues/1578 Fixes: https://github.com/rust-lang/rust/issues/141503 [1]: https://github.com/llvm/llvm-project/issues/104915
2025-05-28coretests: add abs() and copysign() tests, and remove now-unnecessary ui testRalf Jung-91/+56
2025-05-28coretests: simplify test_float macro to derive more things from the type nameRalf Jung-134/+102
2025-05-28Auto merge of #141375 - kraj:kraj/aarch64-musl, r=Mark-Simulacrumbors-2/+1
Disable libunwind cross-architecture unwinding Building with _LIBUNWIND_IS_NATIVE_ONLY disables code for cross-architecture unwinding It also enables some additional code that handles PAC-specific unwind info it helps compiling with the -mbranch-protection=pac or -mbranch-protection=standard flags This fixes build with clang/musl on aarch64
2025-05-28Reorder `ast::ItemKind::{Struct,Enum,Union}` fields.Nicholas Nethercote-56/+54
So they match the order of the parts in the source code, e.g.: ``` struct Foo<T, U> { t: T, u: U } <-><----> <------------> / | \ ident generics variant_data ```
2025-05-28Merge pull request #19879 from Veykril/push-mqykxnqtktuwLukas Wirth-84/+65
fix: Fix IDE layer not resolving some macro calls