about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-02Rollup merge of #144747 - petrochenkov:annusexp2, r=RalfJungSamuel Tardieu-19/+18
compiletest: Improve diagnostics for line annotation mismatches 2 Follow up to https://github.com/rust-lang/rust/pull/140622 based on feedback from https://github.com/rust-lang/rust/issues/144590.
2025-08-02Rollup merge of #144703 - daltenty:daltenty/extern-weak, r=NoratriebSamuel Tardieu-0/+1
[test][AIX] ignore extern_weak linkage test The AIX linkage model doesn't support ELF-style extern_weak semantics, so just skip this test, like other platforms that don't have it.
2025-08-02Rollup merge of #144614 - cjgillot:fortify-unneeded, r=scottmcmSamuel Tardieu-222/+94
Fortify RemoveUnneededDrops test. Test tweak that is useful in preparation for https://github.com/rust-lang/rust/pull/144561
2025-08-02Rollup merge of #144478 - joshtriplett:doc-code-formatting-prep, r=AmanieuSamuel Tardieu-52/+67
Improve formatting of doc code blocks We don't currently apply automatic formatting to doc comment code blocks. As a result, it has built up various idiosyncracies, which make such automatic formatting difficult. Some of those idiosyncracies also make things harder for human readers or other tools. This PR makes a few improvements to doc code formatting, in the hopes of making future automatic formatting easier, as well as in many cases providing net readability improvements. I would suggest reading each commit separately, as each commit contains one class of changes.
2025-08-02Rollup merge of #144395 - folkertdev:fortanix-run-make-test, r=jieyouxuSamuel Tardieu-42/+74
update fortanix tests Firstly, as far as I can tell, no CI job actually runs any of the fortanix tests? Maybe I'm missing the job that runs these tests though? In any case, the `assembly` tests now use `minicore`, meaning that they will run regardless of the host architecture (specifically, they will run during a standard PR CI build). The run-make test is actually broken, and I'd propose to make it just `cargo build` rather than `cargo run`. We can have a separate test for actually running the program, if desired. Also this test is subject to https://github.com/rust-lang/rust/issues/128733, so I'd like to re-evaluate what parts of the C/C++ compilation are actually required or useful. cc [``@jethrogb](https://github.com/jethrogb)`` [``@raoulstrackx](https://github.com/raoulstrackx)`` [``@aditijannu](https://github.com/aditijannu)`` r? ``@jieyouxu``
2025-08-02Rollup merge of #144185 - purplesyringa:poisoning-wording, r=AmanieuSamuel Tardieu-25/+87
Document guarantees of poisoning This mostly documents the current behavior of `Mutex` and `RwLock` (rust-lang/rust#143471) as imperfect. It's unlikely that the situation improves significantly in the future, and even if it does, the rules will probably be more complicated than "poisoning is completely reliable", so this is a conservative guarantee. We also explicitly specify that `OnceLock` never poisons, even though it has an API similar to mutexes. Fixes rust-lang/rust#143471 by improving documentation. r? ``@Amanieu``
2025-08-02Rollup merge of #143771 - Randl:const-result, r=tgross35Samuel Tardieu-25/+197
Constify some more `Result` functions
2025-08-02Rollup merge of #143662 - obi1kenobi:pg/unsafe-attribute-wrappers, r=t-rustdocSamuel Tardieu-14/+46
[rustdoc] Display unsafe attrs with edition 2024 `unsafe()` wrappers. Use Rust 2024 edition representation for unsafe attributes in rustdoc HTML: - `#[no_mangle]` -> `#[unsafe(no_mangle)]` - `#[export_name = "foo"]` -> `#[unsafe(export_name = "foo")]` - `#[link_section = ".text"]` -> `#[unsafe(link_section = ".text")]` The 2024 edition representation is used regardless of the crate's own edition. This ensures that Rustaceans don't have to learn the rules of an outdated edition (e.g. that `unsafe()` wasn't always necessary) in order to understand a crate's documentation. After some looking through the `T-rustdoc` issues, I was not able to find an existing issue for this. Apologies if I missed it. r? ``````@aDotInTheVoid``````
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-01compiletest: Improve diagnostics for line annotation mismatches 2Vadim Petrochenkov-19/+18
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-01Constify additional Result functionsEvgenii Zheltonozhskii-25/+197
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