Commit Graph

466 Commits

Author SHA1 Message Date
bors 930ecbcdf8 Auto merge of #152089 - JonathanBrouwer:rollup-h74gaTC, r=JonathanBrouwer
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#151893 (Move the query list into a new `rustc_middle::queries` module)
 - rust-lang/rust#152060 (ci: Optimize loongarch64-linux dist builders)
 - rust-lang/rust#151993 (Add uv to the list of possible python runners)
 - rust-lang/rust#152047 (Convert to inline diagnostics in `rustc_interface`)
 - rust-lang/rust#152053 (Avoid semicolon suggestion when tail expr is error)

Failed merges:

 - rust-lang/rust#152023 (Some `rustc_query_system` cleanups)
2026-02-04 08:37:48 +00:00
Jonathan Brouwer 89594620f2 Rollup merge of #151893 - Zoxc:query-mod-move, r=nnethercote
Move the query list into a new `rustc_middle::queries` module

This moves the query list from `rustc_middle::query` into a new `rustc_middle::queries` module. This splits up the use of the query system from the remaining implementation of it in `rustc_middle::query`, which conceptually belong to `rustc_query_system`.

The goal is to let rustc crates define queries with their own `queries` module, and this makes `rustc_middle` also fit this pattern.

The inner `queries` module used by the macros are renamed to `query_info`, so it doesn't conflict with the new outer name.
2026-02-04 08:12:40 +01:00
bors 794495e2b4 Auto merge of #151546 - Zoxc:feedable-macro-fix, r=Zalathar
Pass on the `feedable` query modifier to macros

This passes on the `feedable` query modifier to macros so `QueryConfig.feedable` gives the correct result. Currently it's always false even for feedable queries.

Fixing this bug enables some consistency checks for feedable queries that were previously not being performed, which has a perf impact.
2026-02-04 04:36:37 +00:00
John Kåre Alsaker 247a022957 Fix references and remove inner queries module 2026-02-03 21:32:52 +01:00
Jonathan Brouwer 7997b11cfd Rollup merge of #152041 - JonathanBrouwer:query_system_convert, r=jdonszelmann
Convert to inline diagnostics in `rustc_query_system`

For https://github.com/rust-lang/rust/issues/151366#event-22181360642

r? @jdonszelmann (or anyone else who feels like it)
2026-02-03 18:54:51 +01:00
Jonathan Brouwer 5e30860d31 Don't check variables in subdiagnostic messages 2026-02-03 13:24:04 +01:00
Stuart Cook 04ebb635a4 Rollup merge of #152017 - Zoxc:query-rem-with_no_trimmed_paths, r=lqd
Remove `with_no_trimmed_paths` use in query macro

We already use `with_no_trimmed_paths!` when calling query descriptors so the extra call generated by the macro is not needed.
2026-02-03 21:58:41 +11:00
John Kåre Alsaker a802e7c161 Remove with_no_trimmed_paths use in query macro 2026-02-02 22:50:29 +01:00
Jonathan Brouwer 5e1db4491b Rollup merge of #151872 - JonathanBrouwer:diag3, r=Kivooeo
Add inline syntax for diagnostic messages

This PR adds the new inline diagnostics syntax needed for rust-lang/rust#151366.
The syntax itself is briefly described in the MCP: https://github.com/rust-lang/compiler-team/issues/959

To test these changes:
* I added quite a few uitests
* I converted the first crate `rustc_attr_parsing` to the new syntax in a separate PR: https://github.com/rust-lang/rust/pull/151944

r? @Kivooeo
2026-02-02 18:52:14 +01:00
Jonathan Brouwer ca2be71a18 Add verification for inline fluent messages 2026-02-01 11:12:10 +01:00
Jonathan Brouwer 8927aa5738 Add inline syntax for diagnostic messages 2026-02-01 11:11:59 +01:00
Zalathar e044220de5 Make will_cache_on_disk_for_key_fn optional in query vtables 2026-01-30 21:18:29 +11:00
Jonathan Brouwer 2e8347abf4 Remove HasFieldMap trait in favour of passing FieldMap directly 2026-01-28 22:30:29 +01:00
Jonathan Brouwer 0bf3f5d51c Remove unused no_span option 2026-01-28 22:23:23 +01:00
Jonathan Brouwer 5d21a21695 Convert parse_nested_meta to parse_args_with for #[subdiagnostic] 2026-01-28 22:18:44 +01:00
Jonathan Brouwer 9e61014a8a Convert parse_nested_meta to parse_args_with for #[diagnostic] 2026-01-28 22:18:37 +01:00
John Kåre Alsaker 33b77c8886 Pass on the feedable query modifier to macros 2026-01-23 17:57:41 +01:00
Mark Rousskov 3dc7a1f33b Bump stage0 2026-01-21 20:03:56 -05:00
Zalathar 694b86e101 rustc_queries!: Don't push the (cache) modifier twice 2026-01-20 18:07:06 +11:00
Jonathan Brouwer 7216b035fa Factor out diagnostic slug checking from DiagnosticDerive and LintDiagnosticDerive 2026-01-18 21:48:11 +01:00
Nicholas Nethercote 4c2e447027 Rename fatal_cycle as cycle_fatal.
To be consistent with the closely related `cycle_stash` and
`cycle_delay_bug`.
2026-01-16 14:55:03 +11:00
Matthias Krüger 679ab9e061 Rollup merge of #149400 - Skgland:tracked_mod, r=Amanieu
unstable proc_macro tracked::* rename/restructure

Picking up what should be the uncontroversial part of rust-lang/rust#87173 (closed due to inactivity over two years ago).

Part of rust-lang/rust#99515.

- move `proc_macro::tracked_env::var` to `proc_macro::tracked::env_var`
- move `proc_macro::tracked_path::path` to `proc_macro::tracked::path`
- change the argument of `proc_macro::tracked::path` from `AsRef<str>` to `AsRef<Path>`.
2025-12-09 17:36:48 +01:00
Jana Dönszelmann 8c7889bd18 document various traits 2025-12-08 00:28:43 +01:00
Jana Dönszelmann f8bbf2ca06 split out blob decode trait 2025-12-08 00:24:28 +01:00
Skgland 72076c6b54 move and rename proc_macro::tracked_{env::var,path::path} 2025-11-26 22:44:25 +01:00
Deadbeef 696b6ac14d use declarative macro for #[derive(TryFromU32)] 2025-10-06 14:54:38 +00:00
Vadim Petrochenkov f89660e4aa resolve: Do not finalize shadowed bindings
I.e. do not mark them as used, or non-speculative loaded, or similar.
Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
2025-09-25 20:36:14 +03:00
Nicholas Nethercote 301655eafe Revert introduction of [workspace.dependencies].
This was done in #145740 and #145947. It is causing problems for people
using r-a on anything that uses the rustc-dev rustup package, e.g. Miri,
clippy.

This repository has lots of submodules and subtrees and various
different projects are carved out of pieces of it. It seems like
`[workspace.dependencies]` will just be more trouble than it's worth.
2025-09-02 19:12:54 +10:00
Nicholas Nethercote 1ed5660266 Add proc-macro2 and quote to [workspace.dependencies]. 2025-08-28 20:10:55 +10:00
Deadbeef 3450975935 remove should_render in PrintAttribute derive 2025-08-16 21:41:39 +08:00
Esteban Küber b67cd4c6cf cleanup: Remove useless [T].iter().last() 2025-08-14 16:28:56 +00:00
Jana Dönszelmann e1d3ad89c7 remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
Camille GILLOT 3c81faec23 Implement AST visitors using a derive macro. 2025-07-22 01:52:34 +00:00
Jonathan Brouwer 33f2cc7eda Fix line break after ":" in unpretty attribute print
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-06 09:51:47 +02:00
Jana Dönszelmann f6d37a25a9 Rollup merge of #134006 - klensy:typos, r=nnethercote
setup typos check in CI

This allows to check typos in CI, currently for compiler only (to reduce commit size with fixes). With current setup, exclude list is quite short, so it worth trying?

Also includes commits with actual typo fixes.

MCP: https://github.com/rust-lang/compiler-team/issues/817

typos check currently turned for:
* ./compiler
* ./library
* ./src/bootstrap
* ./src/librustdoc

After merging, PRs which enables checks for other crates (tools) can be implemented too.

Found typos will **not break** other jobs immediately: (tests, building compiler for perf run). Job will be marked as red on completion in ~ 20 secs, so you will not forget to fix it whenever you want, before merging pr.

Check typos: `python x.py test tidy --extra-checks=spellcheck`
Apply typo fixes: `python x.py test tidy --extra-checks=spellcheck:fix` (in case if there only 1 suggestion of each typo)

Current fail in this pr is expected and shows how typo errors emitted. Commit with error will be removed after r+.
2025-07-03 13:29:35 +02:00
klensy c76d032f01 setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
Michael Goulet ef4f71957d Remove doc comments from TyCtxtFeed 2025-07-01 00:14:06 +00:00
Yotam Ofek 00b64f8851 Use tidy to sort sym::* items 2025-06-28 09:25:55 +00:00
xizheyin d1f313649c Only args in main diag are saved and restored without removing the newly added ones
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-26 23:06:38 +08:00
xizheyin d2d17c60bd Add runtime check to avoid overwrite arg easily in diag and store and restore snapshot when set subdiag arg
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-25 21:07:16 +08:00
bjorn3 9223704f4b Remove all unused feature gates from the compiler 2025-06-08 14:50:42 +00:00
Michael Goulet 37260e1c5b Allow trailing comma after argument in query definition 2025-05-20 10:22:08 +00:00
Lukas Wirth 1c9f20f24c Enable rust-analyzer to go from query definition to the corresponding provider field 2025-05-17 12:45:32 +02:00
bors 4eca99a18e Auto merge of #140887 - pietroalbini:pa-bootstrap-update, r=compiler-errors
Stage0 bootstrap update

This PR [follows the release process](https://forge.rust-lang.org/release/process.html#master-bootstrap-update-tuesday) to update the stage0 compiler.

The only thing of note is https://github.com/rust-lang/rust/commit/58651d1b316e268fac2100c3ae37bb502a36b8ba, which was flagged by clippy as a correctness fix. I think allowing that lint in our case makes sense, but it's worth to have a second pair of eyes on it.

r? `@Mark-Simulacrum`
2025-05-13 09:54:28 +00:00
omahs 1caaa88700 Fix typos 2025-05-12 17:20:49 +00:00
Pietro Albini 2ce08ca5d6 update cfg(bootstrap) 2025-05-12 15:33:37 +02:00
Zalathar 64bcf3b9f6 Rename rustc_query_append! to rustc_with_all_queries! 2025-04-29 20:48:51 +10:00
Matthias Krüger 564e5ccb5c Rollup merge of #140202 - est31:let_chains_feature_compiler, r=lcnr
Make #![feature(let_chains)] bootstrap conditional in compiler/

Let chains have been stabilized recently in #132833, so we can remove the gating from our uses in the compiler (as the compiler uses edition 2024).
2025-04-25 07:50:25 +02:00
est31 7493e1cdf6 Make #![feature(let_chains)] bootstrap conditional in compiler/ 2025-04-23 16:40:30 +02:00
Nicholas Nethercote 51088fdcee Remove synstructure::Structure::underscore_const calls.
The `synstructure` docs say "This method is a no-op, underscore consts
are used by default now." The behaviour change occurred going from
`synstructure` version 0.13.0 to 0.13.1.
2025-04-23 11:14:27 +10:00