about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-01Rollup merge of #144708 - Stypox:add-tracing-to-step, r=RalfJungRalf Jung-9/+75
Add tracing to step.rs and friends Adds tracing calls to functions in `step.rs` (01717ffecfd47eb51f4877da6ad867b329a1ddd5), to friend functions related to evaluation and stepping (cbfa7c4b96b2ea26c1db185da9b59506bf8c8e55), and adds a new trait method `EnteredTraceSpan::or_if_tracing_disabled` (f0d0d1f5ecdf174696c8a74a5bc98967a2751c93). Adding `EnteredTraceSpan::or_if_tracing_disabled` is optional and is only useful to avoid having both `tracing::info!()` calls (that existed before) and `enter_trace_span!()` calls (that this PR adds) that would be redundant and would slow down the collection of traces. I say it is optional because it adds some cognitive complexity around `EnteredTraceSpan`, which is possibly not worth the reduced redundancy. Let me know if I should revert that commit. The tracing calls added in this PR are meant to make it easier to understand what was being executing at a particular point when looking at a trace. But they are likely not useful for the purpose of understanding which components are fast/slow, hence why I used `tracing_separate_thread` for them. After opening a trace generated using the code in this PR in https://ui.perfetto.dev, and after executing the following query and then pressing on "Show debug track", you will see something like the following image in the timeline: ```sql select slices.id, ts, dur, track_id, category, args.string_value as name, depth, stack_id, parent_stack_id, parent_id, slices.arg_set_id, thread_ts, thread_instruction_count, thread_instruction_delta, cat, slice_id from slices inner join args USING (arg_set_id) where args.key = "args." || slices.name and name = "step" ``` <img width="739" height="87" alt="image" src="https://github.com/user-attachments/assets/74ad9619-9a1f-40e5-9ef4-3db31e33d6e1" />
2025-08-01Rollup merge of #144410 - Gelbpunkt:musl-tier3-dynamic, r=jieyouxuRalf Jung-15/+0
Make tier 3 musl targets link dynamically by default Since we don't build std for these and don't provide any support for them, these can trivially be changed to link dynamically by default.
2025-08-01Rollup merge of #144397 - Kivooeo:issue2, r=jieyouxuRalf Jung-62/+140
`tests/ui/issues/`: The Issues Strike Back [2/N] Some `tests/ui/issues/` housekeeping, to trim down number of tests directly under `tests/ui/issues/`. Part of https://github.com/rust-lang/rust/issues/133895. r? ``@jieyouxu``
2025-08-01add unsupported_calling_conventions to lint listRalf Jung-0/+1
2025-08-01Auto merge of #144768 - jhpratt:rollup-otf1yfj, r=jhprattbors-99/+440
Rollup of 7 pull requests Successful merges: - rust-lang/rust#143849 (rustdoc: never link to unnamable items) - rust-lang/rust#144683 (Simplify library dependencies on `compiler-builtins`) - rust-lang/rust#144691 (Extend `is_case_difference` to handle digit-letter confusables) - rust-lang/rust#144700 (rustdoc-json: Move `#[macro_export]` from `Other` to it's own variant) - rust-lang/rust#144751 (Add correct dynamic_lib_extension for aix) - rust-lang/rust#144757 (Ping Muscraft when emitter change) - rust-lang/rust#144759 (triagebot: Label `compiler-builtins` T-libs) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-01Remove some noisy triagebot pingsJieyou Xu-8/+0
2025-08-01Rollup merge of #144759 - tgross35:triagebot-label, r=lqdJacob Pratt-0/+1
triagebot: Label `compiler-builtins` T-libs Changes to `compiler-builtins` don't currently get a `T-` label, but it is mostly managed by libs. Add the autolabel here.
2025-08-01Rollup merge of #144757 - Muscraft:triagebot-emitter-pings, r=lqdJacob Pratt-0/+8
Ping Muscraft when emitter change While I am working towards `annotate-snippets` being the default emitter for `rustc`, it would be helpful if I were pinged when the default emitter is modified so that I can more easily maintain parity in output between `rustc` and `annotate-snippets`.
2025-08-01Rollup merge of #144751 - dalvescb:curtisd/aix_libextension, r=NoratriebJacob Pratt-0/+2
Add correct dynamic_lib_extension for aix AIX uses `.a` for static and shared libraries, this fixes a number of `run-make` tests on AIX
2025-08-01Rollup merge of #144700 - aDotInTheVoid:macro-rules-for-macro-fools, ↵Jacob Pratt-4/+51
r=GuillaumeGomez rustdoc-json: Move `#[macro_export]` from `Other` to it's own variant Followup to rust-lang/rust#142936. cargo-semver-checks [cares about this attribute](https://github.com/obi1kenobi/trustfall-rustdoc-adapter/blob/4a0d1b0ca19b3115bb65d0b6695c388d7f474ac9/src/visibility_tracker.rs#L459-L476), and it wasn't included in the initial PR for structured attributes CC `@obi1kenobi.` r? `@GuillaumeGomez`
2025-08-01Rollup merge of #144691 - xizheyin:suggest-confuse, r=estebankJacob Pratt-58/+290
Extend `is_case_difference` to handle digit-letter confusables This PR extends `is_case_difference` to handle digit-letter confusables Add support for detecting 0/O, 1/l, 5/S, 8/B, 9/g confusables in error suggestions. r? `@estebank`
2025-08-01Rollup merge of #144683 - tgross35:builtins-via-std-workspace, ↵Jacob Pratt-37/+35
r=bjorn3,Noratrieb Simplify library dependencies on `compiler-builtins` The three panic-related library crates need to have access to `core`, and `compiler-builtins` needs to be in the crate graph. Rather than specifying both dependencies, switch these crates to use `rustc-std-workspace-core` which already does this. This means there is now a single place that the `compiler-builtins` dependency needs to get configured, for everything other than `alloc` and `std`. The second commit removes `compiler-builtins` from `std` (more details in the message).
2025-08-01Rollup merge of #143849 - lolbinarycat:rustdoc-priv-normalize-143222, ↵Jacob Pratt-0/+53
r=GuillaumeGomez rustdoc: never link to unnamable items fixes rust-lang/rust#143222
2025-08-01Auto merge of #144446 - nnethercote:opt-region-constraints, r=lcnrbors-241/+231
Optimize region constraints r? `@lcnr`
2025-07-31triagebot: Label `compiler-builtins` T-libsTrevor Gross-0/+1
Changes to `compiler-builtins` don't currently get a `T-` label, but it is mostly managed by libs. Add the autolabel here.
2025-07-31Remove `std`'s dependency on `compiler-builtins`Trevor Gross-2/+0
`compiler-builtins` is already in the crate graph via `alloc`, and all features related to `compiler-builtins` goes through `alloc`. There isn't any reason that `std` needs this direct dependency, so remove it.
2025-07-31Use `core` via `rustc-std-workspace-core` in `library/panic*`Trevor Gross-24/+24
The three panic-related library crates need to have access to `core`, and `compiler-builtins` needs to be in the crate graph. Rather than specifying both dependencies, switch these crates to use `rustc-std-workspace-core` which already does this. This means there is now a single place that the `compiler-builtins` dependency needs to get configured, for everything other than `alloc` and `std`.
2025-07-31uefi: Use slice equality rather than `memcmp`Trevor Gross-11/+11
`compiler_builtins` shouldn't be called directly. Change the `PartialEq` implementation for `DevicePathNode` to use slice equality instead, which will call `memcmp`/`bcmp` via the intrinsic.
2025-07-31chore: Ping Muscraft when rustc_errors::emitter is modifiedScott Schafer-0/+4
2025-07-31chore: Ping Muscraft when annnotate snippets emitter is modifiedScott Schafer-0/+4
2025-07-31Add EnteredTraceSpan::or_if_tracing_disabledStypox-10/+39
2025-07-31Add tracing to more functions related to step.rsStypox-1/+23
2025-07-31Add tracing calls to eval_statement/terminatorStypox-3/+18
2025-07-31add correct dynamic_lib_extension for aixCurtis D'Alves-0/+2
2025-07-31Create a typed wrapper for codegen backendsJakub Beránek-79/+143
To avoid representing them just with strings.
2025-07-31Remove the witness type from coroutine argsMichael Goulet-136/+54
2025-07-31Extract borrowck coroutine drop-liveness hackMichael Goulet-19/+31
2025-07-31Stall coroutines based off of ty::Coroutine, not ty::CoroutineWitnessMichael Goulet-186/+194
2025-07-31Auto merge of #144740 - jdonszelmann:rollup-nprgqnm, r=jdonszelmannbors-921/+796
Rollup of 6 pull requests Successful merges: - rust-lang/rust#144688 (Uniform `enter_trace_span!` and add documentation) - rust-lang/rust#144702 (stall `ConstArgHasType` in `compute_goal_fast_path`) - rust-lang/rust#144711 (Consider operator's span when computing binop expr span) - rust-lang/rust#144712 (Deduplicate `IntTy`/`UintTy`/`FloatTy`.) - rust-lang/rust#144726 (merge rustc_attr_data_structures into rustc_hir) - rust-lang/rust#144733 (fix: Match width of ascii and unicode secondary file start) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-31commentsKivooeo-62/+140
2025-07-31Rollup merge of #144733 - Muscraft:secondary-file-sigil, r=compiler-errorsJana Dönszelmann-2/+2
fix: Match width of ascii and unicode secondary file start The current [unicode secondary file start](https://github.com/rust-lang/rust/blob/64ca23b6235732fa61c0a2b957c5d7e591e7c972/compiler/rustc_errors/src/emitter.rs#L2991) is only three characters, whereas the ASCII variant and normal [file start](https://github.com/rust-lang/rust/blob/64ca23b6235732fa61c0a2b957c5d7e591e7c972/compiler/rustc_errors/src/emitter.rs#L2983-L2984) are four characters. This slight difference caused the paths following a Unicode secondary file start to not align with other structured elements.
2025-07-31Rollup merge of #144726 - jdonszelmann:move-attr-data-structures, r=lcnrJana Dönszelmann-452/+380
merge rustc_attr_data_structures into rustc_hir this move was discussed on zulip: [#t-compiler > attribute parsing rework @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/attribute.20parsing.20rework/near/528530091) Many PRs in the attribute rework depend on this move.
2025-07-31Rollup merge of #144712 - nnethercote:dedup-num-types, r=fmeaseJana Dönszelmann-403/+312
Deduplicate `IntTy`/`UintTy`/`FloatTy`. There are identical definitions in `rustc_type_ir` and `rustc_ast`. This commit removes them and places a single definition in `rustc_ast_ir`. This requires adding `rust_span` as a dependency of `rustc_ast_ir`, but means a bunch of silly conversion functions can be removed. r? `@fmease`
2025-07-31Rollup merge of #144711 - compiler-errors:op-span, r=petrochenkovJana Dönszelmann-17/+20
Consider operator's span when computing binop expr span When computing the span of a binop consisting of `lhs` and `rhs`, we previously just took the spans of `lhs.span.to(rhs.span)`. In the case that both `lhs` and `rhs` are both arguments to a macro, this can produce a wildly incorrect span. To fix this, first compute the span between `lhs` and the binary operator, which will cause `lhs` to possibly be adjusted to a relevant macro metavar, and then compute that span extended to `rhs`, which will cause it to also be adjusted to a relevant macro metavar. This coincidentally fixes a FIXME in `tests/ui/lint/wide_pointer_comparisons.rs` and suppresses a nonsense suggestion.
2025-07-31Rollup merge of #144702 - compiler-errors:stall-const-arg-has-type, r=lcnrJana Dönszelmann-0/+7
stall `ConstArgHasType` in `compute_goal_fast_path` I'm having major deja-vu about this; I thought that already implemented this but 🤷 maybe not.
2025-07-31Rollup merge of #144688 - Stypox:better-enter-trace-span, r=RalfJungJana Dönszelmann-47/+75
Uniform `enter_trace_span!` and add documentation 1. The latest changes to `enter_trace_span!` were ported from Miri (see https://github.com/rust-lang/miri/pull/4452#discussion_r2204958019), so now both the `rustc_const_eval` and the Miri macro accept the same syntax. Furthermore, the Miri macro was changed to just call rustc_const_eval`'s, to avoid duplication. 2. I made the `layout_of` (& friends) calls use that new syntax, e.g. `enter_trace_span!(layouting::layout_of, ...)` 3. I made sure the macro specifies all types/traits/macros it refers to using `$crate::`, so the macro works anywhere independently of which types/traits/macros are imported in the context it is used in. 4. I added documentation, examples and tips to the macro's doc. To make the rustdoc compile I had to add some hidden lines (`#`), but now it acts as a compilation test which will avoid reintroducing issue 3. in the future. I will also create a documentation file with everything one needs to know about tracing at a later point, but I figured adding some of that info directly on the tracing macro makes it more discoverable. 5. In `stack.rs` I made it so that the `"frame"` span has a field named "frame" (instead of "message") with the data about the frame. This field used to be called "message" (tracing's default) since it was previously formatted using `"{}", instance`, and now I replaced it with `frame = %instance`.
2025-07-31Update cargoWeihang Lo-0/+0
2025-07-31Make Miri's enter_trace_span! call const_eval'sStypox-26/+9
2025-07-31fix: Match width of ascii and unicode secondary file startScott Schafer-2/+2
2025-07-31remove rustc_attr_data_structuresJana Dönszelmann-452/+380
2025-07-31Auto merge of #144731 - samueltardieu:rollup-36y30k2, r=samueltardieubors-50/+203
Rollup of 4 pull requests Successful merges: - rust-lang/rust#136840 (Fix linker-plugin-lto only doing thin lto) - rust-lang/rust#144053 (Remove install Rust script from CI) - rust-lang/rust#144297 (Make `libtest::ERROR_EXIT_CODE` const public to not redefine it in rustdoc) - rust-lang/rust#144721 (`std_detect`: Linux 6.16 support for RISC-V) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-31Rollup merge of #144721 - a4lg:riscv-hwprobe-linux-6.16, r=AmanieuSamuel Tardieu-4/+10
`std_detect`: Linux 6.16 support for RISC-V It adds feature detection of 1 extension (new in `std_detect`). New RISC-V Extension: 1. "Zabha"
2025-07-31Rollup merge of #144297 - GuillaumeGomez:ERROR_EXIT_CODE, r=AmanieuSamuel Tardieu-3/+4
Make `libtest::ERROR_EXIT_CODE` const public to not redefine it in rustdoc I think it's better to make this constant public so it can be used by crates using `libtest` as dependency. As a side-note, I will update https://github.com/rust-lang/rust/pull/143900 to make use of this constant once this is current PR is merged.
2025-07-31Rollup merge of #144053 - Kobzol:ci-remove-install-rust, r=marcoieniSamuel Tardieu-18/+0
Remove install Rust script from CI Windows ARM images should contain Rust now (https://github.com/actions/partner-runner-images/issues/77#issuecomment-3082613685). CC dpaoliello try-job: `*aarch64-msvc*`
2025-07-31Rollup merge of #136840 - Flakebi:linker-plugin-lto-fat, r=dianqkSamuel Tardieu-25/+189
Fix linker-plugin-lto only doing thin lto When rust provides LLVM bitcode files to lld and the bitcode contains function summaries as used for thin lto, lld defaults to using thin lto. This prevents some optimizations that are only applied for fat lto. We solve this by not creating function summaries when fat lto is enabled. The bitcode for the module is just directly written out. An alternative solution would be to set the `ThinLTO=0` module flag to signal lld to do fat lto. The code in clang that sets this flag is here: https://github.com/llvm/llvm-project/blob/560149b5e3c891c64899e9912e29467a69dc3a4c/clang/lib/CodeGen/BackendUtil.cpp#L1150 The code in LLVM that queries the flag and defaults to thin lto if not set is here: https://github.com/llvm/llvm-project/blob/e258bca9505f35e0a22cb213a305eea9b76d11ea/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp#L4441-L4446 try-job: x86_64-gnu-debug try-job: aarch64-gnu-debug
2025-07-31Overhaul `Constraint`.Nicholas Nethercote-241/+227
This commit changes it to store a `Region` instead of a `RegionVid` for the `Var` cases: - We avoid having to call `Region::new_var` to re-create `Region`s from `RegionVid`s in a few places, avoiding the interning process, giving a small perf win. (At the cost of the type allowing some invalid combinations of values.) - All the cases now store two `Region`s, so the commit also separates the `ConstraintKind` (a new type) from the `sub` and `sup` arguments in `Constraint`.
2025-07-31Avoid vacuous `Constraint::{VarSubVar,RegSubReg}` constraints.Nicholas Nethercote-2/+6
If the two regions are the same, we can skip it. This is a small perf win.
2025-07-31Tidy up `Cargo.toml` files.Nicholas Nethercote-14/+44
- Add some missing `tidy-alphabetical-*` markers. - Remove some unnecessary blank lines.
2025-07-31Deduplicate `IntTy`/`UintTy`/`FloatTy`.Nicholas Nethercote-390/+269
There are identical definitions in `rustc_type_ir` and `rustc_ast`. This commit removes them and places a single definition in `rustc_ast_ir`. This requires adding `rust_span` as a dependency of `rustc_ast_ir`, but means a bunch of silly conversion functions can be removed. The one annoying wrinkle is that the old version had differences in their `Debug` impls, e.g. one printed `u32` while the other printed `U32`. Some compiler error messages rely on the former (yuk), and some clippy output depends on the latter. So the commit also changes clippy to not rely on `Debug` and just implement what it needs itself.
2025-07-31Auto merge of #144723 - Zalathar:rollup-f9e0rfo, r=Zalatharbors-152/+244
Rollup of 3 pull requests Successful merges: - rust-lang/rust#144657 (fix: Only "close the window" when its the last annotated file) - rust-lang/rust#144665 (Re-block SRoA on SIMD types) - rust-lang/rust#144713 (`rustc_middle::ty` cleanups) r? `@ghost` `@rustbot` modify labels: rollup