about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-02Migrate `convert_from_to_tryfrom` assist to use `SyntaxEditor`Hmikihiro-19/+23
2025-08-02fmt with table lookup for binary, octal and hexPascal S. de Kloe-122/+55
* correct buffer size * no trait abstraction * similar to decimal
2025-08-02Update E0562 to account for the new impl trait positionsNoratrieb-5/+4
2025-08-02Rollup merge of #144803 - tshepang:rdg-sync, r=jieyouxuSamuel Tardieu-19/+437
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to https://github.com/rust-lang/rustc-dev-guide/commit/928720509932853d91dbbeadb39895c4eeb47bb2. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2025-08-02Rollup merge of #144797 - nilehmann:safety-comment-niche, r=NoratriebSamuel Tardieu-3/+3
Update safety comment for new_unchecked in niche_types Change the safety comment on `new_unchecked` to mention the valid range instead of 0. I noticed this while working on https://github.com/model-checking/verify-rust-std
2025-08-02Rollup merge of #144796 - scrabsha:push-lsnwwpwpnpxr, r=jdonszelmannSamuel Tardieu-0/+1
Add my previous commit name to .mailmap r? ```@jdonszelmann```
2025-08-02Rollup merge of #144786 - JonathanBrouwer:cleanup-group-type, r=jdonszelmannSamuel Tardieu-25/+36
Cleanup the definition of `group_type` r? ```@jdonszelmann```
2025-08-02Rollup merge of #144782 - jieyouxu:compiletest-selftests, r=KobzolSamuel Tardieu-16/+8
Properly pass path to staged `rustc` to `compiletest` self-tests Otherwise, this can do weird things like use a global rustc, or try to use stage 0 rustc. This must be properly configured, because `compiletest` is intended to only support one compiler target spec JSON format (of the in-tree compiler). Historically, this was probably done so before `bootstrap` was really its own thing, and `compiletest` had to be runnable as a much more "self-standing" tool. Follow-up to rust-lang/rust#144675, as I didn't realize this until Zalathar pointed it out in [#t-infra/bootstrap > Building vs testing `compiletest` @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Building.20vs.20testing.20.60compiletest.60/near/532040838). r? ````@Kobzol````
2025-08-02Rollup merge of #144766 - Berrysoft:patch-1, r=GuillaumeGomezSamuel Tardieu-0/+1
Add human readable name "Cygwin" Closes rust-lang/rust#144680
2025-08-02Rollup merge of #144756 - WaffleLapkin:inf-rec-etc-ctfe, r=lqdSamuel Tardieu-1/+28
detect infinite recursion with tail calls in ctfe fixes rust-lang/rust#144753
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 #144554 - cjgillot:no-hir-eff-vis, r=petrochenkovbors-101/+119
Use less HIR to compute effective visibility. r? `@ghost`
2025-08-02Reject adding new UI tests directly under `tests/ui/`Jieyou Xu-0/+30
As we want future UI tests to be added under a more meaningful subdirectory instead.
2025-08-02Pull out recursive ui test check into its own functionJieyou Xu-28/+37
2025-08-02Make `issues_txt_header` a constJieyou Xu-4/+4
2025-08-02Pull out non-descriptive test name check to own functionJieyou Xu-21/+39
2025-08-02Pull out stray/empty output snapshot checks into own functionsJieyou Xu-22/+29
2025-08-02Pull out unexpected extension check into own functionJieyou Xu-42/+46
2025-08-02fix: `let_with_type_underscore` don't eat closing paren in `let (i): _ = 0;` ↵Samuel Tardieu-3/+82
(#15386) Apparently, one can surround a pattern with an arbitrary number of parens, and the resulting `Pat` won't include the span of those parens. And the previous approach extended the to-be-deleted span all the way to the end of `Pat`'s span, so it included the closing paren. I think the new approach is more robust anyway, since all we care to remove (besides the `_`) is the `:`, so we search just for that. ~This does leave one extra whitespace in one of the test cases, but I'd say let rustfmt handle that.~ fixed in the third commit changelog: [`let_with_type_underscore`]: don't eat closing paren in `let (i): _ = 0;` fixes https://github.com/rust-lang/rust-clippy/issues/15377
2025-08-02fix: let_with_type_underscore don't eat closing paren in let (i): _ = 0;Ada Alakbarova-3/+82
add failing tests fix also remove whitespace before `:`
2025-08-02Optimize broken_links by 99.77% (#15385)Samuel Tardieu-38/+38
We were calling an expensive functions lots of times resulting in 12 million instructions for `broken_links`, the doc lint optimization is not over yet... Now the instruction count for `broken_links` is at a healthy 27 thousand. This improvement is a difference of 1.5% in the total analysis time for `tokio`. changelog:[`broken_links`]: Optimize by 99.77%
2025-08-02Stylize `*-lynxos178-*` target maintainer handle to make it easier to copy/pasteJieyou Xu-1/+1
2025-08-02`Interner` arg to `EarlyBinder` does not affect auto traitsLukas Wirth-1/+1
Conceptually `EarlyBinder` does not contain an `Interner` so it shouldn't tell Rust it does via `PhantomData`. This is necessary for rust-analyzer as it stores `EarlyBinder`s in query results which require `Sync`, placing restrictions on our interner setup.
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-02Use less HIR to compute effective visibility.Camille GILLOT-101/+119
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-02don't warn on explicit casts of never to any Waffle Lapkin-35/+20
2025-08-02refactor `unreachable/expr_cast.rs` testWaffle Lapkin-20/+21
2025-08-02Optimize broken_links by 99.77%blyxyas-38/+38
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-02feat: implement `hash_map!` macrostifskere-0/+76
2025-08-02Merge pull request #2526 from rust-lang/rustc-pullTshepang Mbambo-7984/+13829
Rustc pull update
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-01rustdoc font links only emit `crossorigin` when neededMingwei Samuel-1/+54
The `crossorigin` attribute may cause issues when the href is not actuall across origins. Specifically, the tag causes the browser to send a preflight OPTIONS request to the href even if it is same-origin. Some tempermental servers may reject all CORS preflect requests even if they're actually same-origin, which causes a CORS error and prevents the fonts from loading, even later on. This commit fixes that problem by not emitting `crossorigin` if the url looks like a domain-relative url. Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
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-01Fix safety comment for new_unchecked in niche_typesNico Lehmann-3/+3
2025-08-01Remove the omit_gdb_pretty_printer_section attributebjorn3-387/+209
Disabling loading of pretty printers in the debugger itself is more reliable. Before this commit the .gdb_debug_scripts section couldn't be included in dylibs or rlibs as otherwise there is no way to disable the section anymore without recompiling the entire standard library.
2025-08-01Add my previous commit name to .mailmapSasha Pourcelot-0/+1