about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-06-24Make stats code nicer.Nicholas Nethercote-30/+62
Taking inspiration from `-Zmacro-stats`: - Use "{prefix}" consistently. - Use names for column widths. - Write output in a single `eprint!` call, in an attempt to minimize interleaving of output from different rustc processes. - Use `repeat` for the long `---` banners.
2025-06-22Auto merge of #142878 - GuillaumeGomez:rollup-53dohob, r=GuillaumeGomezbors-515/+594
Rollup of 10 pull requests Successful merges: - rust-lang/rust#142458 (Merge unboxed trait object error suggestion into regular dyn incompat error) - rust-lang/rust#142593 (Add a warning to LateContext::get_def_path) - rust-lang/rust#142594 (Add DesugaringKind::FormatLiteral) - rust-lang/rust#142740 (Clean-up `FnCtxt::is_destruct_assignment_desugaring`) - rust-lang/rust#142780 (Port `#[must_use]` to new attribute parsing infrastructure) - rust-lang/rust#142798 (Don't fail to parse a struct if a semicolon is used to separate fields) - rust-lang/rust#142856 (Add a few inline directives in rustc_serialize.) - rust-lang/rust#142868 (remove few allow(dead_code)) - rust-lang/rust#142874 (cranelift: fix target feature name typo: "fxsr") - rust-lang/rust#142877 (Document why tidy checks if `eslint` is installed via `npm`) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-22Rollup merge of #142877 - ↵Guillaume Gomez-0/+3
yotamofek:pr/rustdoc/comment-eslint-installation-req, r=GuillaumeGomez Document why tidy checks if `eslint` is installed via `npm` Discussion here: rust-lang/rust#142851
2025-06-22Rollup merge of #142874 - marxin:cranelift-typo-fix, r=bjorn3Guillaume Gomez-2/+2
cranelift: fix target feature name typo: "fxsr" Fix a typo introduced in 71b698c0b81c2e35c852ebcdf1f5cbe9e9162a50 CC: `@clubby789` `@bjorn3`
2025-06-22Rollup merge of #142868 - klensy:dc, r=oli-obkGuillaume Gomez-6/+1
remove few allow(dead_code) Few from serial/parallel compiler leftovers and few from bootstrap.
2025-06-22Rollup merge of #142856 - cjgillot:inline-serialize, r=petrochenkovGuillaume Gomez-0/+4
Add a few inline directives in rustc_serialize. I see `debug_strict_add` and `debug_strict_sub` appearing in callgrind output. This bothers me. This PR should make them disappear.
2025-06-22Rollup merge of #142798 - camsteffen:recover-semi, r=compiler-errorsGuillaume Gomez-39/+30
Don't fail to parse a struct if a semicolon is used to separate fields The first commit is a small refactor.
2025-06-22Rollup merge of #142780 - JonathanBrouwer:must_use_new_attr, r=jdonszelmannGuillaume Gomez-69/+151
Port `#[must_use]` to new attribute parsing infrastructure Ports `must_use` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 r? `@jdonszelmann`
2025-06-22Rollup merge of #142740 - ada4a:is-destruct-assignment-desugaring, r=fee1-deadGuillaume Gomez-13/+12
Clean-up `FnCtxt::is_destruct_assignment_desugaring` I noticed the docstring thing and fixed that; then I thought I'd rewrite the method using let-chains while I'm at it, since that seemed appropriate. But I don't feel too strongly about the second change, so let me know if I should remove it
2025-06-22Rollup merge of #142594 - mejrs:new_desugaring, r=chenyukangGuillaume Gomez-165/+290
Add DesugaringKind::FormatLiteral Implements `DesugaringKind::FormatLiteral` to mark the FormatArgs desugaring of format literals. The main use for this is to stop yapping about about formatting parameters if we're not anywhere near a format literal. The other use case is to fix suggestions such as https://github.com/rust-lang/rust/issues/141350. It might also be useful for new or existing diagnostics that check whether they're in a format-like macro. cc `@xizheyin` `@fmease`
2025-06-22Rollup merge of #142593 - blyxyas:improve-docs-itty-bitty-change, ↵Guillaume Gomez-0/+9
r=compiler-errors Add a warning to LateContext::get_def_path Preventing anyone from doing the same error as https://github.com/rust-lang/rust-clippy/pull/15043 fixed
2025-06-22Rollup merge of #142458 - oli-obk:dyn-incompat, r=compiler-errorsGuillaume Gomez-221/+92
Merge unboxed trait object error suggestion into regular dyn incompat error Another hir-walker removed from the well-formed queries. This error was always a duplicate of another, but it was able to provide more information because it could invoke `is_dyn_compatible` without worrying about cycle errors. That's also the reason we can't put the error directly into hir_ty_lowering when lowering a `dyn Trait` within an associated item signature. So instead I packed it into the error handling of wf obligation checking.
2025-06-22Document why tidy checks if `eslint` is installed via `npm`Yotam Ofek-0/+3
2025-06-22cranelift: fix target feature name type: "fxsr"Martin Liska-2/+2
2025-06-22Auto merge of #142706 - fee1-dead-contrib:push-zsznlqyrzsqo, r=oli-obkbors-725/+468
completely deduplicate `Visitor` and `MutVisitor` r? oli-obk This closes rust-lang/rust#127615. ### Discussion > * Give every `MutVisitor::visit_*` method a corresponding `flat_map_*` method. Not every AST node exists in a location where they can be mapped to multiple instances of themselves. Not every AST node exists in a location where they can be removed from existence (e.g. `filter_map_expr`). I don't think this is doable. > * Give every `MutVisitor::visit_*` method a corresponding `Visitor` method and vice versa The only three remaining method-level asymmetries after this PR are `visit_stmt` and `visit_nested_use_tree` (only on `Visitor`) and `visit_span` (only on `MutVisitor`). `visit_stmt` doesn't seem applicable to `MutVisitor` because `walk_flat_map_stmt_kind` will ask `flat_map_item` / `filter_map_expr` to potentially turn a single `Stmt` to multiple based on what a visitor wants. So only using `flat_map_stmt` seems appropriate. `visit_nested_use_tree` is used for `rustc_resolve` to track stuff. Not useful for `MutVisitor` for now. `visit_span` is currently not used for `MutVisitor` already, it was just kept in case we want to revive rust-lang/rust#127241. cc `@cjgillot` maybe we could remove for now and re-insert later if we find a use-case? It does involve some extra effort to maintain. * Remaining FIXMEs `visit_lifetime` has an extra param for `Visitor` that's not in `MutVisitor`. This is again something only used by `rustc_resolve`. I think we can keep that symmetry for now.
2025-06-22Port `#[must_use]` to new attribute parsing infrastructureJonathan Brouwer-69/+151
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-22Turn a comment that looks like a docstring into a docstringAda Alakbarova-13/+12
rewrite using let-chains
2025-06-22remove few from bootstrap tooklensy-2/+1
2025-06-22remove allow(dead_code) leftovers from serial/parallel compilerklensy-4/+0
2025-06-22Auto merge of #142864 - jhpratt:rollup-mf0yq8o, r=jhprattbors-913/+536
Rollup of 10 pull requests Successful merges: - rust-lang/rust#140254 (Pass -Cpanic=abort for the panic_abort crate) - rust-lang/rust#142600 (Port `#[rustc_pub_transparent]` to the new attribute system) - rust-lang/rust#142617 (improve search graph docs, reset `encountered_overflow` between reruns) - rust-lang/rust#142747 (rustdoc_json: conversion cleanups) - rust-lang/rust#142776 (All HIR attributes are outer) - rust-lang/rust#142800 (integer docs: remove extraneous text) - rust-lang/rust#142841 (Enable fmt-write-bloat for Windows) - rust-lang/rust#142845 (Enable textrel-on-minimal-lib for Windows) - rust-lang/rust#142850 (remove asm_goto feature annotation, for it is now stabilized) - rust-lang/rust#142860 (Notify me on tidy changes) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-22Stop dbg! macro yapping about format modifiersmejrs-10/+33
2025-06-22Implement DesugaringKind::FormatLiteralmejrs-159/+261
2025-06-22Rollup merge of #142860 - jieyouxu:notify-tidy, r=jieyouxuJacob Pratt-0/+4
Notify me on tidy changes r? ghost
2025-06-22Rollup merge of #142850 - tshepang:patch-1, r=jieyouxuJacob Pratt-1/+0
remove asm_goto feature annotation, for it is now stabilized This was stabilized in https://github.com/rust-lang/rust/pull/133870
2025-06-22Rollup merge of #142845 - dpaoliello:textrel-on-minimal-lib, r=jieyouxuJacob Pratt-5/+3
Enable textrel-on-minimal-lib for Windows `bin_name` needs to be used when building a runnable executable. Addresses item in rust-lang/rust#128602 --- try-job: x86_64-mingw-* try-job: x86_64-msvc-* try-job: i686-msvc-*
2025-06-22Rollup merge of #142841 - dpaoliello:fmt-write-bloat, r=jieyouxuJacob Pratt-7/+2
Enable fmt-write-bloat for Windows Seems to be working fine for MSVC once it has the correct binary name. Addresses item in rust-lang/rust#128602 --- try-job: x86_64-mingw-* try-job: x86_64-msvc-* try-job: i686-msvc-*
2025-06-22Rollup merge of #142800 - tshepang:extraneous, r=Mark-SimulacrumJacob Pratt-455/+0
integer docs: remove extraneous text "Basic usage" implies there is an example that shows advanced usage, but these APIs are extra simple.
2025-06-22Rollup merge of #142776 - dtolnay:hirattrstyle2, r=jdonszelmannJacob Pratt-167/+197
All HIR attributes are outer Fixes https://github.com/rust-lang/rust/issues/142649. Closes https://github.com/rust-lang/rust/pull/142759. All HIR attributes, including parsed and not yet parsed, will now be rendered as outer attributes by `rustc_hir_pretty`. The original style of the corresponding AST attribute(s) is not relevant for pretty printing, only for diagnostics. r? ````@jdonszelmann````
2025-06-22Rollup merge of #142747 - nnethercote:json-conversion-cleanups, r=aDotInTheVoidJacob Pratt-189/+169
rustdoc_json: conversion cleanups A bunch of clean-to-types conversion cleanups I found while working on perf-related stuff in rustdoc_json. r? ```@aDotInTheVoid```
2025-06-22Rollup merge of #142617 - lcnr:search_graph-3, r=compiler-errorsJacob Pratt-73/+122
improve search graph docs, reset `encountered_overflow` between reruns I think this shouldn't really matter for now. It will be more relevant for my current rework as we otherwise cannot partially reevaluate the root goal in case there has been overflow during the prervious iteration. r? ````@BoxyUwU````
2025-06-22Rollup merge of #142600 - GrigorenkoPV:attributes/rustc_pub_transparent, ↵Jacob Pratt-4/+29
r=jdonszelmann Port `#[rustc_pub_transparent]` to the new attribute system Very similar to rust-lang/rust#142498. This is a part of rust-lang/rust#131229, so r? ````@jdonszelmann```` --- For reference, the `#[rustc_pub_transparent]` attribute was created by me back in rust-lang/rust#129487. As mentioned back in https://github.com/rust-lang/rust/pull/129487#discussion_r1730120385, this attribute does not check that it is applied to an ADT, because it checks that `#[repr(transparent)]` is also applied to the same item, which, in turn, should check for ADT.
2025-06-22Rollup merge of #140254 - bjorn3:rustc_panic_abort_abort, r=petrochenkovJacob Pratt-12/+10
Pass -Cpanic=abort for the panic_abort crate The panic_abort crate must be compiled with panic=abort, but cargo doesn't allow setting the panic strategy for a single crate the usual way using `panic="abort"`, but luckily per-package rustflags do allow this. Bootstrap previously handled this in its rustc wrapper, but for example the build systems of cg_clif and cg_gcc don't use the rustc wrapper, so they would either need to add one, patch the standard library or be unable to build a sysroot suitable for both panic=abort and panic=unwind (as is currently the case). Required for https://github.com/rust-lang/rustc_codegen_cranelift/issues/1567
2025-06-22Auto merge of #142675 - tmiasko:preserve-cache, r=oli-obkbors-1/+1
Preserve caches in a call to shrink_to_fit A small follow up to rust-lang/rust#142542.
2025-06-22Auto merge of #141856 - folkertdev:run-make-forward-compiletest-runner, ↵bors-2/+30
r=jieyouxu forward the bootstrap `runner` to `run-make` The runner was already forwarded to `compiletest`, this just passes it on to `run-make` and uses it in the `run` functions. The configuration can look like this ```toml # in bootstrap.toml [target.s390x-unknown-linux-gnu] runner = "qemu-s390x -L /usr/s390x-linux-gnu" ``` Any C compilation automatically sets the correct target. Calls to rustc must use `.target(target())`. Then, a command like below will work by cross-compiling to the given target, and using the given runner for that target to execute the binary: ``` ./x test tests/run-make/c-link-to-rust-va-list-fn --target s390x-unknown-linux-gnu ``` The runner can also be used for e.g. running with `valgrind`. This PR also enables its use in the test case that I care about, hopefully that actually does work on the platforms that CI uses. We should probably run some try jobs to be sure? r? `@jieyouxu` try-job: test-various try-job: armhf-gnu
2025-06-22Notify `jieyouxu` on tidy changesJieyou Xu-0/+4
2025-06-21Add a few inline directives in rustc_serialize.Camille GILLOT-0/+4
2025-06-22forward the bootstrap `runner` to `run-make`Folkert de Vries-2/+30
The runner was already forwarded to `compiletest`, this just passes it on to `run-make` and uses it in the `run` functions.
2025-06-21Auto merge of #142667 - yotamofek:pr/rustdoc/more-write-shared-perf, ↵bors-27/+12
r=nnethercote Avoid a few more allocations in `write_shared.rs` Inspired by rust-lang/rust#141421 , avoids a few `Vec`, `PathBuf` and `String` allocations in `write_shared.rs`. I don't think these will show up on benchmarks, but are still worthwhile IMHO. Also includes a few small cleanups. r? nnethercote - if you'd like :)
2025-06-22Rename some methods.Nicholas Nethercote-8/+12
- `convert_static` -> `from_clean_static` - `from_function` -> `from_clean_function` To match the pre-existing `from_clean_item` and `FromClean::from_clean`. I left `JsonRenderer::convert_item` unchanged because it's a bit different.
2025-06-22Use `FromClean` more.Nicholas Nethercote-121/+156
The `FromClean` trait is used a lot for converting to rustdoc-json format. But it's not used universally; there are still some ad hoc functions and methods for converting. This commit fixes this inconsistency by using `FromClean` more. The commit also introduces `FromClean` for `Box` and `Option`. This lets a lot of `as_ref` and `map` calls be removed in favour of simple `into_json` calls.
2025-06-22Remove some code.Nicholas Nethercote-32/+1
It's just replicating exactly what is done by `<Vec<GenericParamDef> as FromClean>::into_json`
2025-06-22Remove some dead code.Nicholas Nethercote-25/+0
We currently have both `FromClean<clean::Constant> for Constant` and `FromClean<clean::ConstantKind> for Constant` which are basically identical, but the former is unused.
2025-06-22Use `sym::asterisk` to avoid a `Symbol::intern` call.Nicholas Nethercote-5/+2
2025-06-21remove asm_goto feature annotation, for it is now stabilizedTshepang Mbambo-1/+0
2025-06-21Enable textrel-on-minimal-lib for WindowsDaniel Paoliello-5/+3
2025-06-21Auto merge of #142546 - cjgillot:reachable-jump, r=compiler-errorsbors-2/+13
Only traverse reachable blocks in JumpThreading. Fixes https://github.com/rust-lang/rust/issues/131451 We only compute loop headers for reachable blocks. We shouldn't try to perform an opt on unreachable blocks anyway.
2025-06-21Port `#[rustc_pub_transparent]` to the new attribute systemPavel Grigorenko-4/+29
2025-06-21Enable fmt-write-bloat for WindowsDaniel Paoliello-7/+2
2025-06-21All HIR attributes are outerDavid Tolnay-156/+140
2025-06-21Add regression test for issue 142649David Tolnay-0/+22