about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-03-15Merge pull request #19370 from DriedYellowPeach/refactor/io-resultChayim Refael Friedman-2/+1
refactor: Simplify by removing ? operator
2025-03-15refactor: Simplify by removing ? operatorNeil-2/+1
`out.flush()` already returns a `io::Result<()>`, so there is no need for `?` operator and `Ok(())`
2025-03-15Do not error for actions with no data to resolveKirill Bulatov-1/+1
Same as the other resolve code handlers in the same file. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#version_3_17_0 does not forbid resolving with no data, so instead of erroring, just consider such items resolved already.
2025-03-15Add RTN support to rustdocMichael Goulet-0/+1
2025-03-15Merge pull request #19366 from Veykril/push-mkunlxkysssrLukas Wirth-228/+164
chore: Remove legacy `SyntaxContextId` re-export
2025-03-15Merge pull request #19367 from Veykril/push-ryowkxkntnpoLukas Wirth-10115/+9
chore: Drop legacy salsa
2025-03-15chore: Remove legacy `SyntaxContextId` re-exportLukas Wirth-228/+164
2025-03-15chore: Drop legacy salsaLukas Wirth-10115/+9
2025-03-15Merge pull request #19364 from Veykril/push-uonyorwwzpzxLukas Wirth-3/+8
fix: Fix missing `with_durability` calls
2025-03-15fix: Fix missing `with_durability` callsLukas Wirth-3/+8
2025-03-15Auto merge of #138464 - compiler-errors:less-type-ir, r=lcnrbors-1/+1
Use `rustc_type_ir` directly less in the codebase cc https://github.com/rust-lang/rust/issues/138449 This is a somewhat opinionated bundle of changes that will make working on https://github.com/rust-lang/rust/issues/138449 more easy, since it cuts out the bulk of the changes that would be necessitated by the lint. Namely: 1. Fold `rustc_middle::ty::fold` and `rustc_middle::ty::visit` into `rustc_middle::ty`. This is because we already reexport some parts of these modules into `rustc_middle::ty`, and there's really no benefit from namespacing away the rest of these modules's functionality given how important folding and visiting is to the type layer. 2. Rename `{Decodable,Encodable}_Generic` to `{Decodable,Encodable}_NoContext`[^why], change it to be "perfect derive" (`synstructure::AddBounds::Fields`), use it throughout `rustc_type_ir` instead of `TyEncodable`/`TyDecodable`. 3. Make `TyEncodable` and `TyDecodable` derives use `::rustc_middle::ty::codec::TyEncoder` (etc) for its generated paths, and move the `rustc_type_ir::codec` module back to `rustc_middle::ty::codec` :tada:. 4. Stop using `rustc_type_ir` in crates that aren't "fundamental" to the type system, namely middle/infer/trait-selection. This amounted mostly to changing imports from `use rustc_type_ir::...` to `use rustc_middle::ty::...`, but also this means that we can't glob import `TyKind::*` since the reexport into `rustc_middle::ty::TyKind` is a type alias. Instead, use the prefixed variants like `ty::Str` everywhere -- IMO this is a good change, since it makes it more regularized with most of the rest of the compiler. [^why]: `_NoContext` is the name for derive macros with no additional generic bounds and which do "perfect derive" by generating bounds based on field types. See `HashStable_NoContext`. I'm happy to cut out some of these changes into separate PRs to make landing it a bit easier, though I don't expect to have much trouble with bitrot. r? lcnr
2025-03-15Fold visit into tyMichael Goulet-1/+1
2025-03-15Auto merge of #138379 - estebank:macro-backtrace-note, r=petrochenkovbors-24/+0
Do not suggest using `-Zmacro-backtrace` for builtin macros For macros that are implemented on the compiler, or that are annotated with `rustc_diagnostic_item`, which have arbitrary implementations from the point of view of the user and might as well be intrinsics, we do *not* mention the `-Zmacro-backtrace` flag. This includes `derive`s and standard macros like `panic!` and `format!`. This PR adds a field to every `Span`'s `ExpnData` stating whether it comes from a builtin macro. This is determined by the macro being annotated with either `#[rustc_builtin_macro]` or `#[rustc_diagnostic_item]`. An alternative to using these attributes that already exist for other uses would be to introduce another attribute like `#[rustc_no_backtrace]` to have finer control on which macros are affected (for example, an error within `vec![]` now doesn't mention the backtrace, but one could make the case that it should). Ideally, instead of carrying this information in the `ExpnData` we'd instead try to query the `DefId` of the macro (that is already stored) to see if it is annotated in some way, but we do not have access to the `TyCtxt` from `rustc_errors`. r? `@petrochenkov`
2025-03-15Merge from rustcThe Miri Cronjob Bot-19/+42
2025-03-15Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-03-15Auto merge of #138523 - fmease:rollup-j2j5h59, r=fmeasebors-29/+52
Rollup of 9 pull requests Successful merges: - #138056 (rustc_target: Add target features for LoongArch v1.1) - #138451 (Build GCC on CI with GCC, not Clang) - #138454 (Improve post-merge workflow) - #138460 (Pass struct field HirId when check_expr_struct_fields) - #138474 (Refactor is_snake_case.) - #138482 (Fix HIR printing of parameters) - #138507 (Mirror NetBSD sources) - #138511 (Make `Parser::parse_expr_cond` public) - #138518 (Fix typo in hir lowering lint diag) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-15Rollup merge of #138451 - Kobzol:gcc-ci-build-gcc, r=GuillaumeGomezLeón Orell Valerian Liehr-29/+52
Build GCC on CI with GCC, not Clang It seems that GCC built with Clang misbehaves. I have tested that cg_gcc tests [pass](https://github.com/rust-lang/rust/actions/runs/13842365913/job/38732750617?pr=138451) on CI with a downloaded GCC that was built in this way. Prerequisite for https://github.com/rust-lang/rust/pull/138395. r? ```@ghost```
2025-03-14Require Rust 1.85David Richey-1/+1
2025-03-14Update cargoWeihang Lo-0/+0
2025-03-14Merge pull request #19271 from vishruth-thimmaiah/for_loop_to_while_letLukas Wirth-2/+467
feat: for loop to while let assist
2025-03-14Do not suggest using `-Zmacro-backtrace` for builtin macrosEsteban Küber-24/+0
For macros that are implemented on the compiler, we do *not* mention the `-Zmacro-backtrace` flag. This includes `derive`s and standard macros.
2025-03-14Fix clippyEric Holk-1/+1
2025-03-14Teach rustfmt to handle postfix yieldEric Holk-4/+33
2025-03-14Preserve yield position during pretty printingEric Holk-2/+2
2025-03-14Merge pull request #19356 from flodiebold/push-snpyvwuulkmwLukas Wirth-19/+20
fix: Avoid recursively debug printing crates
2025-03-14Avoid recursively debug printing cratesFlorian Diebold-19/+20
2025-03-14feat: for loop to while let assistVishruth-Thimmaiah-2/+467
2025-03-14Split `variant_data` into its own queryLukas Wirth-211/+189
2025-03-14Split enum variants out of `enum_data` queryLukas Wirth-52/+74
2025-03-14Move attribute parsing out of data moduleLukas Wirth-124/+128
2025-03-14Split assoc items out of `trait_data`/`impl_data` queriesLukas Wirth-397/+446
2025-03-14Auto merge of #138480 - jhpratt:rollup-y3b8wu5, r=jhprattbors-9/+3
Rollup of 16 pull requests Successful merges: - #136001 (Overhaul examples for PermissionsExt) - #136230 (Reword incorrect documentation about SocketAddr having varying layout) - #136892 (Sync Fuchsia target spec with clang Fuchsia driver) - #136911 (Add documentation URL to selected jobs) - #137870 ( Improve HashMap docs for const and static initializers) - #138179 (Add `src/tools/x` to the main workspace) - #138389 (use `expect` instead of `allow`) - #138396 (Enable metrics and verbose tests in PR CI) - #138398 (atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance) - #138432 (fix: remove the check of lld not supporting `@response-file)` - #138434 (Visit `PatField` when collecting lint levels) - #138441 (update error message) - #138442 (EUV: fix place of deref pattern's interior's scrutinee) - #138457 (Remove usage of legacy scheme paths on RedoxOS) - #138461 (Remove an outdated line from a test comment) - #138466 (Remove myself from libs review) Failed merges: - #138452 (Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-14Rollup merge of #138441 - tshepang:patch-5, r=jieyouxuJacob Pratt-1/+1
update error message [`compile-pass` has since been renamed to `build-pass`](https://github.com/rust-lang/rust/issues/62277)
2025-03-14Rollup merge of #138179 - cuviper:x, r=jieyouxuJacob Pratt-8/+2
Add `src/tools/x` to the main workspace The original reason to exclude it was so it could run before submodules were initialized. However, those have all been converted to subtrees now, so the entire workspace is always ready to go. I've also alphabetized the workspace members, as it was an untidy mess. :broom:
2025-03-14Merge from rustcThe Miri Cronjob Bot-299/+191
2025-03-14Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-03-14Auto merge of #138157 - scottmcm:inline-more-tiny-things, r=oli-obkbors-2/+2
Allow more top-down inlining for single-BB callees This means that things like `<usize as Step>::forward_unchecked` and `<PartialOrd for f32>::le` will inline even if we've already done a bunch of inlining to find the calls to them. Fixes #138136 ~~Draft as it's built atop #138135, which adds a mir-opt test that's a nice demonstration of this. To see just this change, look at <https://github.com/rust-lang/rust/pull/138157/commits/48f63e3be552605c2933056b77bf23a326757f92>~~ Rebased to be just the inlining change, as the other existing tests show it great.
2025-03-13Do not overwrite original `config.toml` in `opt-dist`Jakub Beránek-29/+52
So that follow-up CI commands can proceed normally. It will also avoid overwriting `config.toml` when running opt-dist tests locally.
2025-03-13Alphabetize the root workspace membersJosh Stone-0/+2
2025-03-13Add `src/tools/x` to the main workspaceJosh Stone-8/+0
The original reason to exclude it was so it could run before submodules were initialized. However, those have all been converted to subtrees now, so the entire workspace is always ready to go.
2025-03-13internal: don't panic when the crate graph isn't ready #19351David Barsky-30/+50
2025-03-13bump html5ever to 0.29 with depsklensy-1/+1
2025-03-13bump html5ever to 0.28klensy-13/+13
see https://github.com/servo/html5ever/pull/548
2025-03-13Rollup merge of #138417 - RalfJung:interpret-cleanup, r=oli-obkMatthias Krüger-50/+60
minor interpreter cleanups - remove the `eval_inline_asm` hook that `@saethlin` added; the usage never materialized and he agreed with removing it - I tried merging `init_alloc_extra` and `adjust_global_allocation` and it didn't work; leave a comment as to why. Also, make the allocation code path a bit more clear by renaming `init_alloc_extra` to `init_local_allocation`. r? `@oli-obk`
2025-03-13Rollup merge of #138406 - ehuss:update-mdbook, r=jieyouxuMatthias Krüger-3/+12
Update mdbook to 0.4.47 This updates mdbook to bring in an important fix that enables the `output.html.hash-files` option to deal with network caching. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0446 https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0447
2025-03-14Stablize feature `anonymous_pipe`Jiahao XU-2/+0
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2025-03-13Auto merge of #138450 - matthiaskrgr:rollup-4im25vf, r=matthiaskrgrbors-1/+9
Rollup of 6 pull requests Successful merges: - #137816 (attempt to support `BinaryFormat::Xcoff` in `naked_asm!`) - #138109 (make precise capturing args in rustdoc Json typed) - #138343 (Enable `f16` tests for `powf`) - #138356 (bump libc to 0.2.171 to fix xous) - #138371 (Update compiletest's `has_asm_support` to match rustc) - #138404 (Cleanup sysroot locating a bit) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-13Rollup merge of #138371 - cuviper:stable-asm-test, r=jieyouxuMatthias Krüger-1/+9
Update compiletest's `has_asm_support` to match rustc The list of `ASM_SUPPORTED_ARCHS` was missing a few from the compiler's actual stable list.
2025-03-13Rollup merge of #126856 - onur-ozkan:remove-rls, r=clubby789Matthias Krüger-123/+0
remove deprecated tool `rls` This tool has been deprecated for two years and now it only gives warning without doing anything useful. Zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/excluding.20rls.20from.20the.20release try-job: x86_64-gnu-distcheck
2025-03-13remove fixmejnyfah-1/+0