about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-07-27Ensure correct aligement of rustc_hir::Lifetime on platforms with lower ↵FractalFir-0/+5
default alignments.
2025-07-27Auto merge of #143884 - LorrensP-2158466:resolve-split-define, r=petrochenkovbors-57/+100
Resolve: refactor `define` into `define_local` and `define_extern` Follow up on rust-lang/rust#143550 and part of [#gsoc > Project: Parallel Macro Expansion](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Parallel.20Macro.20Expansion/with/527348747). Split up `define` into `define_local` and `define_extern`. Refactor usages of `define` into either one where it's "correct" (idk if everything is correct atm). Big part of this is that `resolution` can now take a `&Resolver` instead of a mutable one. r? `@petrochenkov`
2025-07-27split up define into define_extern and define_localLorrensP-2158466-57/+100
2025-07-27Auto merge of #144528 - matthiaskrgr:rollup-felcjc1, r=matthiaskrgrbors-399/+275
Rollup of 4 pull requests Successful merges: - rust-lang/rust#144226 (Do not assert layout in KnownPanicsLint.) - rust-lang/rust#144385 (Optimize performance by inline in macro hygiene system) - rust-lang/rust#144454 (move uefi test to run-make) - rust-lang/rust#144455 (Unify LLVM ctlz/cttz intrinsic generation) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-27Rollup merge of #144455 - TDecking:ctlz-cttz, r=SparrowLiiMatthias Krüger-19/+9
Unify LLVM ctlz/cttz intrinsic generation The type signature for `llvm.ctlz` is the same as the one for `llvm.cttz`, which enables a small simplification.
2025-07-27Rollup merge of #144454 - folkertdev:uefi-tests, r=jieyouxuMatthias Krüger-151/+90
move uefi test to run-make Turn the `uefi` test into a more standard `run-make` test, and execute it using the `test-various` CI job like before. This is just a straightforward translation of the python code, but using `run-make` to supply the target (hence the 3 separate calls in the docker file). r? ```@jieyouxu``` cc ```@nicholasbishop``` try-job: test-various
2025-07-27Rollup merge of #144385 - xizheyin:macro-hygiene, r=petrochenkovMatthias Krüger-0/+17
Optimize performance by inline in macro hygiene system I inline some small method in `rustc_span/src/hygiene.rs` and so on.
2025-07-27Rollup merge of #144226 - cjgillot:known-panics-panics, r=oli-obkMatthias Krüger-229/+159
Do not assert layout in KnownPanicsLint. Fixes rust-lang/rust#121176 Fixes rust-lang/rust#129109 Fixes rust-lang/rust#130970 Fixes rust-lang/rust#131347 Fixes rust-lang/rust#139872 Fixes rust-lang/rust#140332
2025-07-27Auto merge of #144347 - scottmcm:ssa-enums-v0, r=WaffleLapkinbors-64/+110
No longer need `alloca`s for consuming `Result<!, i32>` and similar In optimized builds GVN gets rid of these already, but in `opt-level=0` we actually make `alloca`s for this, which particularly impacts `?`-style things that use actually-only-one-variant types like this. While doing so, rewrite `LocalAnalyzer::process_place` to be non-recursive, solving a 6+ year old FIXME. r? codegen
2025-07-27Auto merge of #144526 - jhpratt:rollup-1x1tyvn, r=jhprattbors-401/+633
Rollup of 13 pull requests Successful merges: - rust-lang/rust#141840 (If `HOME` is empty, use the fallback instead) - rust-lang/rust#144359 (add codegen test for variadics) - rust-lang/rust#144379 (test using multiple c-variadic ABIs in the same program) - rust-lang/rust#144383 (disable cfg.has_reliable_f128 on amdgcn) - rust-lang/rust#144409 (Stop compilation early if macro expansion failed) - rust-lang/rust#144422 (library/windows_targets: Fix macro expansion error in 'link' macro) - rust-lang/rust#144429 (Enable outline-atomics for aarch64-unknown-linux-musl) - rust-lang/rust#144430 (tests: aarch64-outline-atomics: Remove hardcoded target) - rust-lang/rust#144445 (Fix `./x check bootstrap` (again)) - rust-lang/rust#144453 (canonicalize build root in `tests/run-make/linker-warning`) - rust-lang/rust#144464 (Only run bootstrap tests in `x test` on CI) - rust-lang/rust#144470 (clif: Don't set the `compiler-builtins-no-f16-f128` feature) - rust-lang/rust#144480 (Revert "coverage: Enlarge empty spans during MIR instrumentation, not codegen") r? `@ghost` `@rustbot` modify labels: rollup
2025-07-26Rollup merge of #144480 - Zalathar:revert-empty-span, r=ZalatharJacob Pratt-57/+46
Revert "coverage: Enlarge empty spans during MIR instrumentation, not codegen" Surprisingly, rust-lang/rust#144298 alone (extracted from rust-lang/rust#140847) was enough to re-trigger the failures observed in https://github.com/rust-lang/rust/issues/141577#issuecomment-3120667286. --- This reverts commit f877aa7d14916f71a2f88c6d4c009e7ded7684c4. --- r? ghost
2025-07-26Rollup merge of #144470 - tgross35:clif-remove-no-f16-f128, r=bjorn3Jacob Pratt-5/+0
clif: Don't set the `compiler-builtins-no-f16-f128` feature Since rust-lang/rust be35d37d8b6c ("Use the compiler to determine whether or not to enable f16 and f128"), `compiler-builtins` relies on `rustc` to report whether or not `f16` and `f128` are supported, which is reported by the backend. This means that there should no longer be any need to unconditionally disable the types for clif in Bootstrap. Backend config: https://github.com/rust-lang/rust/blob/a955f1cd09a027363729ceed919952d09f76f28e/compiler/rustc_codegen_cranelift/src/lib.rs#L224-L233
2025-07-26Rollup merge of #144464 - Kobzol:x-test-default, r=jieyouxuJacob Pratt-1/+5
Only run bootstrap tests in `x test` on CI Discussed at https://rust-lang.zulipchat.com/#narrow/channel/122652-new-members/topic/Linux.20Distribution/with/530839642. The bootstrap tests can be sensitive of the environment where they are executed. And now that they are executed very early in the test pipeline, it can be annoying for people who just try to do `x test` when it fails on bootstrap tests. We could move the bootstrap tests back to the end of the `x test` pipeline, but then it would just fail later. I'd prefer to only run them on CI by default. Fixes: https://github.com/rust-lang/rust/issues/143973
2025-07-26Rollup merge of #144453 - WaffleLapkin:canonical-build-root, r=jieyouxuJacob Pratt-1/+3
canonicalize build root in `tests/run-make/linker-warning` r? jieyouxu This is similar to rust-lang/rust#139823 -- the test fails for me because my build dir is a symlink.
2025-07-26Rollup merge of #144445 - jieyouxu:revert-shared_helpers_tests, r=KobzolJacob Pratt-11/+23
Fix `./x check bootstrap` (again) Redoes rust-lang/rust#134883 and reverts 40c2ca96411caaeab1563ff9041879f742d1d71b from rust-lang/rust#142416. Unfortunately I missed this during review. - Commit 1: Reverts 40c2ca96411caaeab1563ff9041879f742d1d71b and re-applies rust-lang/rust#134883. - Commit 2: Check `./x check bootstrap` in `pr-check-1` to catch "obvious" problems like this. r? Kobzol
2025-07-26Rollup merge of #144430 - Gelbpunkt:aarch64-outline-atomics-target, r=NoratriebJacob Pratt-2/+0
tests: aarch64-outline-atomics: Remove hardcoded target Since this test is limited to aarch64 and linux hosts, the `--target` flag is entirely unnecessary and only breaks this on musl hosts. Let the compiler use the default target instead.
2025-07-26Rollup merge of #144429 - Gelbpunkt:outline-atomics-aarch64-musl, r=AmanieuJacob Pratt-1/+1
Enable outline-atomics for aarch64-unknown-linux-musl They were disabled in bd287fa5084f2e153c1044632f9f3d190f090d69 and haven't been causing problems for a while anymore, see https://github.com/rust-lang/rust/issues/89626 for details. The entire testsuite still passes on `aarch64-unknown-linux-musl` with this feature enabled.
2025-07-26Rollup merge of #144422 - itf:itf-patch-2-1, r=ChrisDentonJacob Pratt-13/+3
library/windows_targets: Fix macro expansion error in 'link' macro A recent change altered the definition of the link! macro when the windows_raw_dylib feature is enabled, changing its syntax from pub macro {..} to pub macro($tt:tt) {..} in rust-lang/rust#143592 This change introduced a build failure with the error: "macros that expand to items must be delimited with braces or followed by a semicolon". We add a semicolon to the line causing the issue as we also modify the non windows_raw_dylib link to make use of the link_dylib macro
2025-07-26Rollup merge of #144409 - GuillaumeGomez:macro-expansion-early-abort, r=oli-obkJacob Pratt-249/+323
Stop compilation early if macro expansion failed Fixes rust-lang/rust#116180. So there isn't really a type that is central for macro expansion and some errors are actually emitted (because the resolution happens after the expansion I suppose) after the expansion pass (like "not found macro"). Sometimes, errors are only emitted on the second "try" (to improve error output). So I couldn't reach a similar solution than what was done in https://github.com/rust-lang/rust/pull/133937 and suggested by ````@estebank```` in https://github.com/rust-lang/rust/issues/116180#issuecomment-3109468922. But maybe I missed something? So in the end, I realized that there is method called every time (except one, described below) a macro error is actually emitted: `ExtCtxt::trace_macros_diag`. Considering I updated what it did, I renamed it into `macro_error_and_trace_macros_diag` to better reflect it. There is only one call of `trace_macros_diag` which isn't reporting an error but just used for `macro_trace` feature, so I kept it as is. r? ````@oli-obk````
2025-07-26Rollup merge of #144383 - ZuseZ4:disable-f128-on-amdgcn, r=oli-obkJacob Pratt-0/+2
disable cfg.has_reliable_f128 on amdgcn I was experimenting with compiling a few kernels for amd while working on std::offload. It seems like the logic in https://github.com/rust-lang/compiler-builtins/pull/737 got removed, so I re-introduce it here. Probably should have a test to avoid another regression and make sure that f128 doesn't show up as target feature for amdgcn. It looks like currently we neither check that for nvptx, nor amdgpu. Maybe I could add two revisions to https://github.com/rust-lang/rust/blob/master/tests/ui/float/target-has-reliable-nightly-float.rs? r? ````@Flakebi```` fixes: https://github.com/rust-lang/rust/issues/144381
2025-07-26Rollup merge of #144379 - folkertdev:c-variadic-same-program-multiple-abis, ↵Jacob Pratt-0/+112
r=RalfJung test using multiple c-variadic ABIs in the same program tracking issue: https://github.com/rust-lang/rust/issues/100189 Check that multiple c-variadic calling conventions can be used in the same program. Clang and gcc reject defining functions with a non-default calling convention and a variable argument list, so C programs that use multiple c-variadic calling conventions are unlikely to come up. Here we validate that our codegen backends do in fact generate correct code. (CI will not run this test because it runs on aarch64, I would like to at least test that this runs on windows) try-job: `x86_64-gnu` try-job: `x86_64-msvc-*` try-job: `x86_64-apple-2`
2025-07-26Rollup merge of #144359 - RalfJung:vararg-codegen, r=compiler-errorsJacob Pratt-59/+110
add codegen test for variadics This is a part of https://github.com/rust-lang/rust/pull/144066 that can land without FCP.
2025-07-26Rollup merge of #141840 - ChrisDenton:noempty, r=ChrisDentonJacob Pratt-2/+5
If `HOME` is empty, use the fallback instead This is a minor change in the `home_dir` api. An empty path is never (or should never be) valid so if the `HOME` environment variable is empty then let's use the fallback instead. r? libs-api
2025-07-26Auto merge of #143860 - scottmcm:transmute-always-rvalue, r=WaffleLapkinbors-106/+258
Let `codegen_transmute_operand` just handle everything When combined with rust-lang/rust#143720, this means `rvalue_creates_operand` can just return `true` for *every* `Rvalue`. (A future PR could consider removing it, though just letting it optimize out is fine for now.) It's nicer anyway, IMHO, because it avoids needing the layout checks to be consistent in the two places, and thus is an overall reduction in code. Plus it's a more helpful building block when used in other places this way. (TBH, it probably would have been better to have it this way the whole time, but I clearly didn't understand `rvalue_creates_operand` when I originally wrote rust-lang/rust#109843.)
2025-07-26Do not check Sync during type_of.Camille GILLOT-264/+26
2025-07-26Auto merge of #143500 - compiler-errors:characterize-less, r=lcnrbors-4/+9
Skip walking into param-env component if it has no placeholder/re-var Although it only provides a minor perf improvement, it seems like it could matter in more pathological cases.
2025-07-26Auto merge of #144502 - matthiaskrgr:rollup-o81uk9m, r=matthiaskrgrbors-156/+193
Rollup of 10 pull requests Successful merges: - rust-lang/rust#144331 (Disable non_exhaustive_omitted_patterns within matches! macro) - rust-lang/rust#144376 (Suggest unwrapping when private method name is available in inner type) - rust-lang/rust#144421 (Call `is_parsed_attribute` rather than keeping track of a list of parsed attributes manually) - rust-lang/rust#144424 (Allow setting `release-blog-post` label with rustbot) - rust-lang/rust#144427 (rename ext_tool_checks to extra_checks and use mod.rs) - rust-lang/rust#144435 (rustc-dev-guide subtree update) - rust-lang/rust#144448 (Limit defaultness query to impl of trait) - rust-lang/rust#144462 (Allow pretty printing paths with `-Zself-profile-events=args`) - rust-lang/rust#144463 (change_tracker: fix a typo) - rust-lang/rust#144468 (resolve: Do not create `NameResolutions` on access unless necessary) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-26Rollup merge of #144468 - petrochenkov:resolution, r=lqd,SparrowLiiMatthias Krüger-61/+66
resolve: Do not create `NameResolutions` on access unless necessary `fn resolution` now just performs the access, and `fn resolution_or_default` will insert a default entry if the entry is missing.
2025-07-26Rollup merge of #144463 - ognevny:change-tracker-typo, r=KobzolMatthias Krüger-1/+1
change_tracker: fix a typo there is no `llvm.lld` option r? `@Kobzol`
2025-07-26Rollup merge of #144462 - Kobzol:pretty-print-self-profile-args, r=RalfJungMatthias Krüger-0/+24
Allow pretty printing paths with `-Zself-profile-events=args` `-Zself-profile-events=args` is pretty heavy and can pretty print a lot of stuff. Rather than hunting down specific cases where this happens, I'd just allow calling `trimmed_def_paths` in this mode. Fixes: https://github.com/rust-lang/rust/issues/144457 r? `@RalfJung`
2025-07-26Rollup merge of #144448 - camsteffen:defaultness-impl-trait-only, ↵Matthias Krüger-4/+7
r=compiler-errors Limit defaultness query to impl of trait I separated this out from https://github.com/rust-lang/rust/pull/144386.
2025-07-26Rollup merge of #144435 - tshepang:rdg-sync, r=jieyouxuMatthias Krüger-14/+15
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to https://github.com/rust-lang/rustc-dev-guide/commit/4e310882ba9eaa71a192870837e949854057b3b0. Created using https://github.com/rust-lang/josh-sync. r? ```@ghost```
2025-07-26Rollup merge of #144427 - lolbinarycat:tidy-extra_checks-rename, r=KobzolMatthias Krüger-3/+3
rename ext_tool_checks to extra_checks and use mod.rs this makes the triagebot pings for this module simpler discussed in https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/rename.20and.20reorganize.20ext_tool_checks.20module.3F/with/528398253 r? `@Kobzol`
2025-07-26Rollup merge of #144424 - BoxyUwU:release_blog_post_unauthorized_users, ↵Matthias Krüger-0/+1
r=cuviper Allow setting `release-blog-post` label with rustbot r? release I forgot to do this when we originally added the label and updated the generated description for relnotes issues
2025-07-26Rollup merge of #144421 - JonathanBrouwer:cleanup-malformed-list, r=oli-obkMatthias Krüger-61/+6
Call `is_parsed_attribute` rather than keeping track of a list of parsed attributes manually r? ```@oli-obk``` Nicer code & will prevent issues like https://github.com/rust-lang/rust/pull/144358 in the future
2025-07-26Rollup merge of #144376 - estebank:issue-143795, r=lcnrMatthias Krüger-2/+34
Suggest unwrapping when private method name is available in inner type Given ```rust fn main() { let maybe_vec = Some(vec![1,2,3]); assert_eq!(maybe_vec.len(), 3); } ``` suggest unwraping `maybe_vec` to call `.len()` on the `Vec<_>`. ``` error[E0624]: method `len` is private --> $DIR/enum-method-probe.rs:61:9 | LL | res.len(); | ^^^ private method --> $SRC_DIR/core/src/option.rs:LL:COL | = note: private method defined here | note: the method `len` exists on the type `Vec<{integer}>` --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL help: consider using `Option::expect` to unwrap the `Vec<{integer}>` value, panicking if the value is an `Option::None` | LL | res.expect("REASON").len(); | +++++++++++++++++ ``` When a method isn't available, we emit E0599, but when it is private we emit E0624. We now just invoke the same suggestion logic from the later that we already did in the former. Fix rust-lang/rust#143795.
2025-07-26Rollup merge of #144331 - ↵Matthias Krüger-10/+36
jplatte:matches-allow-non_exhaustive_omitted_patterns, r=Nadrieril Disable non_exhaustive_omitted_patterns within matches! macro Closes rust-lang/rust#117304. I believe I can skip all of the bootstrap stuff mentioned in https://github.com/rust-lang/rust/issues/117304#issuecomment-1784414453 due to https://blog.rust-lang.org/inside-rust/2025/05/29/redesigning-the-initial-bootstrap-sequence/, right? cc `@Jules-Bertholet`
2025-07-26test using multiple c-variadic ABIs in the same programFolkert de Vries-0/+112
2025-07-26move uefi test to run-makeFolkert de Vries-151/+90
2025-07-26Auto merge of #144490 - tgross35:rollup-ps0utme, r=tgross35bors-61/+459
Rollup of 9 pull requests Successful merges: - rust-lang/rust#140871 (Don't lint against named labels in `naked_asm!`) - rust-lang/rust#141663 (rustdoc: add ways of collapsing all impl blocks) - rust-lang/rust#143272 (Upgrade the `fortanix-sgx-abi` dependency) - rust-lang/rust#143585 (`loop_match`: suggest extracting to a `const` item) - rust-lang/rust#143698 (Fix unused_parens false positive) - rust-lang/rust#143859 (Guarantee 8 bytes of alignment in Thread::into_raw) - rust-lang/rust#144160 (tests: debuginfo: Work around or disable broken tests on powerpc) - rust-lang/rust#144412 (Small cleanup: Use LocalKey<Cell> methods more) - rust-lang/rust#144431 (Disable has_reliable_f128_math on musl targets) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-26Rollup merge of #144431 - Gelbpunkt:f128-math-musl, r=petrochenkov,tgross35Trevor Gross-2/+7
Disable has_reliable_f128_math on musl targets musl does not implement the symbols required by rustc for f128 maths. Disable the associated cfg for all musl targets and adjust the tests accordingly. Closes rust-lang/rust#144423
2025-07-26Rollup merge of #144412 - camsteffen:localkey-cell-refactors, r=petrochenkovTrevor Gross-9/+9
Small cleanup: Use LocalKey<Cell> methods more
2025-07-26Rollup merge of #144160 - Gelbpunkt:debuginfo-tests-ppc, r=oli-obkTrevor Gross-2/+14
tests: debuginfo: Work around or disable broken tests on powerpc f16 support for PowerPC has issues in LLVM, therefore we need a small workaround to prevent LLVM from emitting symbols that don't exist for PowerPC yet. It also appears that rust-lang/rust#128973 applies to PowerPC targets as well, though I've only tested 64-bit Linux targets.
2025-07-26Rollup merge of #143859 - orlp:thread-into-raw-align, r=jhprattTrevor Gross-1/+7
Guarantee 8 bytes of alignment in Thread::into_raw When using `AtomicPtr` for synchronization it's incredibly useful when you've got a couple bits you can stuff metadata in. By guaranteeing that `Thread`'s `Inner` struct is aligned to 8 bytes everyone can use the bottom 3 bits to signal other things, such as a critical section, etc. This guarantee is thus very useful and costs us nothing.
2025-07-26Rollup merge of #143698 - benschulz:unused-parens-2, r=lcnr,compiler-errorsTrevor Gross-1/+52
Fix unused_parens false positive Resolves rust-lang/rust#143653. The "no bounds exception" was indiscriminately set to `OneBound` for referents and pointees. However, if the reference or pointer type itself appears in no-bounds position, any constraints it has must be propagated. ```rust // unused parens: not in no-bounds position fn foo(_: Box<(dyn Send)>) {} // unused parens: in no-bounds position, but one-bound exception applies fn bar(_: Box<dyn Fn(&u32) -> &(dyn Send)>) {} // *NOT* unused parens: in no-bounds position, but no exceptions to be made fn baz(_: Box<dyn Fn(&u32) -> &(dyn Send) + Send>) {} ```
2025-07-26Rollup merge of #143585 - folkertdev:loop-match-suggest-const-block, r=oli-obkTrevor Gross-4/+297
`loop_match`: suggest extracting to a `const` item tracking issue: https://github.com/rust-lang/rust/issues/132306 fixes https://github.com/rust-lang/rust/issues/143310 fixes https://github.com/rust-lang/rust/issues/143936
2025-07-26Rollup merge of #143272 - tgross35:bump-fortanix, r=jhpratt,jethrogbTrevor Gross-5/+4
Upgrade the `fortanix-sgx-abi` dependency 0.6.1 removes the `compiler-builtins` dependency, part of RUST-142265. The breaking change from 0.5 to 0.6 is for an update to the `insecure_time` API [1]. I validated that `./x c library --target x86_64-fortanix-unknown-sgx` completes successfully with this change. Link: https://github.com/fortanix/rust-sgx/commit/a34e9767f37d6585c18bdbd31cddcadc56670d57 [1]
2025-07-26Rollup merge of #141663 - lolbinarycat:rustdoc-collapse-impl-134429, ↵Trevor Gross-6/+22
r=GuillaumeGomez rustdoc: add ways of collapsing all impl blocks either shift+click the Summary button, or use the `_` key. this collapses everything, including (inherent) impl blocks. no need for a special "expand all impl blocks" method, as impl blocks are expanded during regular "expand all". doing "expand all" -> "collapse all" will always result in only impl blocks being expaned. not sure the best way to add a GUI test. fixes https://github.com/rust-lang/rust/issues/134429
2025-07-26Rollup merge of #140871 - Amanieu:naked-asm-label, r=compiler-errorsTrevor Gross-31/+47
Don't lint against named labels in `naked_asm!` Naked functions are allowed to define global labels, just like `global_asm!`.
2025-07-26Auto merge of #144488 - tgross35:rollup-vn0fpot, r=tgross35bors-125/+788
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144089 (Rehome 35 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`) - rust-lang/rust#144171 (pattern_analysis: add option to get a full set of witnesses) - rust-lang/rust#144201 (Mention type that could be `Clone` but isn't in more cases) - rust-lang/rust#144316 (bootstrap: Move musl-root fallback out of sanity check) - rust-lang/rust#144339 (Enable dwarf-mixed-versions-lto.rs test on RISC-V (riscv64)) - rust-lang/rust#144341 (Enable const-vector.rs test on RISC-V (riscv64)) - rust-lang/rust#144352 (RustWrapper: Suppress getNextNonDebugInfoInstruction) - rust-lang/rust#144356 (Add `ignore-backends` annotations in failing GCC backend ui tests) - rust-lang/rust#144364 (Update `dlmalloc` dependency of libstd) r? `@ghost` `@rustbot` modify labels: rollup