about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-02Rollup merge of #143360 - folkertdev:const-continue-outside-loop-match, ↵Samuel Tardieu-34/+107
r=WaffleLapkin loop match: error on `#[const_continue]` outside `#[loop_match]` tracking issue https://github.com/rust-lang/rust/issues/132306 fixes https://github.com/rust-lang/rust/issues/143119 fixes https://github.com/rust-lang/rust/issues/143165 Fixes several ICEs because a panic was reachable. ``````@rustbot`````` label +F-loop_match
2025-08-02Rollup merge of #132748 - ↵Samuel Tardieu-26/+295
lolbinarycat:rustdoc-intra-doc-link-warn-more-54191, r=GuillaumeGomez get rid of some false negatives in rustdoc::broken_intra_doc_links rustdoc will not try to do intra-doc linking if the "path" of a link looks too much like a "real url". however, only inline links (`[text](url)`) can actually contain a url, other types of links (reference links, shortcut links) contain a *reference* which is later resolved to an actual url. the "path" in this case cannot be a url, and therefore it should not be skipped due to looking like a url. fixes https://github.com/rust-lang/rust/issues/54191 to minimize the number of false positives that will be introduced, the following heuristic is used: If there's no backticks, be lenient revert to old behavior. This is to prevent churn by linting on stuff that isn't meant to be a link. only shortcut links have simple enough syntax that they are likely to be written accidentlly, collapsed and reference links need 4 metachars, and reference links will not usually use backticks in the reference name. therefore, only shortcut syntax gets the lenient behavior. here's a truth table for how link kinds that cannot be urls are handled: | | is shortcut link | not shortcut link | |--------------|--------------------|-------------------| | has backtick | never ignore | never ignore | | no backtick | ignore if url-like | never ignore |
2025-08-02Auto merge of #129183 - estebank:cfg-visitor, r=davidtwcobors-161/+281
Detect more `cfg`d out items in resolution errors Use a visitor to collect *all* items (including those nested) that were stripped behind a `cfg` condition. ``` error[E0425]: cannot find function `f` in this scope --> $DIR/nested-cfg-attrs.rs:4:13 | LL | fn main() { f() } | ^ not found in this scope | note: found an item that was configured out --> $DIR/nested-cfg-attrs.rs:2:4 | LL | fn f() {} | ^ note: the item is gated here --> $DIR/nested-cfg-attrs.rs:1:35 | LL | #[cfg_attr(all(), cfg_attr(all(), cfg(FALSE)))] | ^^^^^^^^^^ ```
2025-08-02Auto merge of #144479 - cjgillot:incr-privacy-mod, r=petrochenkovbors-65/+68
Perform check_private_in_public by module. Based on https://github.com/rust-lang/rust/pull/116316
2025-08-01Tweak rendering of cfg'd out itemEsteban Küber-222/+136
``` error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner` --> $DIR/diagnostics-cross-crate.rs:18:23 | LL | cfged_out::inner::doesnt_exist::hello(); | ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner` | note: found an item that was configured out --> $DIR/auxiliary/cfged_out.rs:6:13 | LL | #[cfg(false)] | ----- the item is gated here LL | pub mod doesnt_exist { | ^^^^^^^^^^^^ ```
2025-08-01tiny cleanupEsteban Küber-12/+7
2025-08-01remove recursive search for itemsEsteban Küber-45/+17
2025-08-01Limit how deep we visit items to find cfg'd out namesEsteban Küber-3/+12
2025-08-01Detect more `cfg`d out items in resolution errorsEsteban Küber-43/+273
Use a visitor to collect *all* items (including those nested) that were stripped behind a `cfg` condition. ``` error[E0425]: cannot find function `f` in this scope --> $DIR/nested-cfg-attrs.rs:4:13 | LL | fn main() { f() } | ^ not found in this scope | note: found an item that was configured out --> $DIR/nested-cfg-attrs.rs:2:4 | LL | fn f() {} | ^ note: the item is gated here --> $DIR/nested-cfg-attrs.rs:1:35 | LL | #[cfg_attr(all(), cfg_attr(all(), cfg(FALSE)))] | ^^^^^^^^^^ ```
2025-08-01Auto merge of #144458 - compiler-errors:no-witness-mini, r=lcnrbors-335/+273
Remove the witness type from coroutine *args* (without actually removing the type) This does as much of rust-lang/rust#144157 as we can without having to break rust-lang/rust#143545 and/or introduce some better way of handling higher ranked assumptions. Namely, it: * Stalls coroutines based off of the *coroutine* type rather than the witness type. * Reworks the dtorck constraint hack to not rely on the witness type. * Removes the witness type from the args of the coroutine, eagerly creating the type for nested obligations when needed (auto/clone impls). I'll experiment with actually removing the witness type in a follow-up. r? lcnr
2025-08-01Auto merge of #144735 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 3 commits in a7fcef21feb4d835d1fee83b3f93b4aef86d5545..840b83a10fb0e039a83f4d70ad032892c287570a 2025-07-13 02:25:52 +0000 to 2025-07-30 13:59:19 +0000 - chore: fix some minor issues in comments (rust-lang/cargo#15787) - feat(schema): Expose `IndexPackage`, the description of a package within a Registry Index (rust-lang/cargo#15770) - chore: update toml/toml_edit to latest (rust-lang/cargo#15779) r? ghost
2025-08-01Auto merge of #144773 - RalfJung:rollup-uif2yyj, r=RalfJungbors-173/+359
Rollup of 6 pull requests Successful merges: - rust-lang/rust#144397 (`tests/ui/issues/`: The Issues Strike Back [2/N]) - rust-lang/rust#144410 (Make tier 3 musl targets link dynamically by default) - rust-lang/rust#144708 (Add tracing to step.rs and friends) - rust-lang/rust#144730 (Create a typed wrapper for codegen backends in bootstrap) - rust-lang/rust#144771 (Remove some noisy triagebot pings for myself) - rust-lang/rust#144772 (add unsupported_calling_conventions to lint list) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-01Rollup merge of #144772 - RalfJung:unsupported_calling_conventions, r=lqdRalf Jung-0/+1
add unsupported_calling_conventions to lint list Seems like you can emit lints without them being on the list, but users cannot control them then... *oops*.
2025-08-01Rollup merge of #144771 - jieyouxu:noisy-ping, r=jieyouxuRalf Jung-8/+0
Remove some noisy triagebot pings for myself r? ghost
2025-08-01Rollup merge of #144730 - Kobzol:bootstrap-cg-typed, r=jieyouxuRalf Jung-79/+143
Create a typed wrapper for codegen backends in bootstrap To avoid representing them just with strings.
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-08-01loop match: error on `#[const_continue]` outside `#[loop_match]`Folkert de Vries-34/+107
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.