Commit graph

485 commits

Author SHA1 Message Date
Nicholas Nethercote
e9288e7e90 Remove last remnants of rustc_query_system.
At this point module `ich` is the only thing left.
2026-02-16 22:56:47 +11:00
bjorn3
fa753a46c1 Remove code for ThinLTO from cg_gcc
It was just a dummy implementation to workarround the fact that thin
local lto is the default in rustc. By adding a thin_lto_supported thin
local lto can be automatically disabled for cg_gcc, removing the need
for this dummy implementation. This makes improvements to the LTO
handling on the cg_ssa side a lot easier.
2026-02-15 10:05:48 +00:00
Jonathan Brouwer
018a5efcf7
Rename inline_fluent! to msg! 2026-02-14 13:47:52 +01:00
Jonathan Brouwer
f1b935d08f
Rollup merge of #152356 - JonathanBrouwer:inline_diag4, r=jdonszelmann
Improve the `inline_fluent!` macro

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

This PR turns `inline_fluent!` into a proc macro, so we can run validation on the messages in this macro :)
I started a thread here because I don't like the name of the macro, but that's for a future PR: [#t-compiler > Bikeshed the new `inline_fluent!` macro](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Bikeshed.20the.20new.20.60inline_fluent!.60.20macro/with/572646242)
2026-02-13 13:35:01 +01:00
Jonathan Brouwer
65d982abd8
Rollup merge of #152469 - mu001999-contrib:cleanup/unused-features, r=nadrieril,jdonszelmann
Remove unused features

Detected by https://github.com/rust-lang/rust/pull/152164.

~~Only allow `unused_features` if there are complex platform-specific features enabled.~~
2026-02-13 13:34:58 +01:00
mu001999
a07f837491 Remove unused features in compiler 2026-02-13 09:25:39 +08:00
John Kåre Alsaker
8cc4b936a4 Change query proc macro to be more rust-analyzer friendly 2026-02-12 12:39:51 +01:00
bors
7b25457166 Auto merge of #151943 - Zalathar:cache-on-disk, r=TaKO8Ki
Clean up query macros for `cache_on_disk_if`

This PR aims to make the macros for dealing with `cache_on_disk_if` a bit easier to read and work with.

There should be no change to compiler behaviour.
2026-02-10 20:57:44 +00:00
Jonathan Brouwer
faa15808cf
Rollup merge of #152355 - JonathanBrouwer:update-macro-doc, r=nnethercote
Update documentation of rustc_macros

Update the docs to reflect the changes in https://github.com/rust-lang/rust/issues/151366
2026-02-10 13:00:49 +01:00
Jonathan Brouwer
2377d355ad
Update documentation of rustc_macros 2026-02-10 10:17:59 +01:00
Jonathan Brouwer
41e0e0690f
Move inline_fluent to a proc macro 2026-02-09 19:12:13 +01:00
Jonathan Brouwer
2d65a33c61
Implement indent check 2026-02-08 23:07:57 +01:00
Jonathan Brouwer
62dd37131f
Remove slugs from the #[derive(Diagnostic)] macro 2026-02-08 11:03:56 +01:00
Jonathan Brouwer
00dd7dbe57
Allow more capitalized words 2026-02-07 10:31:36 +01:00
Jonathan Brouwer
9a114c686f
Convert to inline diagnostics in rustc_parse 2026-02-07 10:30:40 +01:00
Jonathan Brouwer
edd43c9e1f
Fix existing messages in the diag structs 2026-02-07 09:11:34 +01:00
Jonathan Brouwer
ca9c227700
Check style of messages in rustc_macros 2026-02-07 09:09:23 +01:00
Zalathar
438220673f Incorporate query description functions into QueryVTable 2026-02-05 18:41:34 +11:00
Zalathar
892665ba11 Clean up query macros for cache_on_disk_if 2026-02-05 16:46:40 +11:00
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