Commit graph

3579 commits

Author SHA1 Message Date
Jonathan Brouwer
d58a87b287
Rollup merge of #152108 - JonathanBrouwer:convert_expand, r=jdonszelmann
Convert to inline diagnostics in `rustc_expand`

For https://github.com/rust-lang/rust/issues/151366
r? @jdonszelmann
2026-02-05 08:32:52 +01:00
Jonathan Brouwer
945bfa770e
Rollup merge of #152105 - GuillaumeGomez:inline-diag-rustc_ast_lowering, r=JonathanBrouwer
Convert to inline diagnostics in `rustc_ast_lowering`

Part of https://github.com/rust-lang/rust/issues/151366.

r? @JonathanBrouwer
2026-02-05 08:32:51 +01:00
Jonathan Brouwer
f5a90728e3
Rollup merge of #152081 - clubby789:port-depgraph-attrs, r=JonathanBrouwer
Port depgraph testing attributes to parser

Tracking issue: rust-lang/rust#131229

Ports `#[rustc_clean]`, `#[rustc_if_this_changed]` and `#[rustc_then_this_would_need]` attributes.

Removes references to `rustc_dirty` as that attribute was folded into `rustc_clean` some time ago and rename some code accordingly.

r? JonathanBrouwer
2026-02-05 08:32:50 +01:00
Jonathan Brouwer
50c768e1bb
Rollup merge of #152068 - JonathanBrouwer:convert_resolve, r=lqd
Convert to inline diagnostics in `rustc_resolve`

For https://github.com/rust-lang/rust/issues/151366
2026-02-05 08:32:47 +01:00
Jonathan Brouwer
cf2ea13042
Rollup merge of #152023 - nnethercote:rm-Value, r=nnethercote
Some `rustc_query_system` cleanups

Small improvements I found while looking closely at `rustc_query_system`. Best reviewed one commit at a time.

r? @cjgillot
2026-02-05 08:32:46 +01:00
Nicholas Nethercote
0932068b6c Move the QueryOverflow and QueryOverflowNote errors.
They are defined in `rustc_query_system` but used in `rustc_query_impl`.
This is very much *not* how things are supposed to be done; I suspect
someone got lazy and took a shortcut at some point.

This commit moves the errors into `rustc_query_impl`. This requires more
lines of code to give `rustc_query_impl` an errors module, but it's
worthwhile to do things in the normal way instead of a weird exceptional
way.
2026-02-05 09:29:46 +11:00
Jamie Hill-Daniel
de7067938d Port rustc_if_this_changed/rustc_then_this_would_need to attr parser 2026-02-04 21:00:36 +00:00
Jamie Hill-Daniel
94a0ba50e1 Port rustc_clean to attribute parser
Also remove mentions of removed `rustc_dirty`
2026-02-04 20:58:02 +00:00
Jonathan Brouwer
44a14c1f30
Convert to inline diagnostics in rustc_hir_typeck 2026-02-04 21:36:48 +01:00
Jonathan Brouwer
e005754c06
Convert to inline diagnostics in rustc_resolve 2026-02-04 18:32:44 +01:00
Guillaume Gomez
8d09ba7ae5 Convert to inline diagnostics in rustc_ast_lowering 2026-02-04 16:28:49 +01:00
Jonathan Brouwer
9dab26a9ab
Convert to inline diagnostics in rustc_expand 2026-02-04 16:16:16 +01:00
Jonathan Brouwer
cf0e19b0b4
Rollup merge of #152102 - bjorn3:inline_fluent_codegen_backends, r=JonathanBrouwer,GuillaumeGomez
Convert to inline diagnostics in all codegen backends

Part of https://github.com/rust-lang/rust/issues/151366

r? @JonathanBrouwer
2026-02-04 14:39:29 +01:00
Jonathan Brouwer
bf838717a4
Rollup merge of #152072 - JonathanBrouwer:convert_monomorphize, r=jdonszelmann
Convert to inline diagnostics in `rustc_monomorphize`

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

r? @jdonszelmann
2026-02-04 14:39:27 +01:00
Jonathan Brouwer
ecafacdeb7
Rollup merge of #152069 - JonathanBrouwer:convert_privacy, r=lqd
Convert to inline diagnostics in `rustc_privacy`

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

r? @jdonszelmann
2026-02-04 14:39:25 +01:00
Jonathan Brouwer
1c142db7d9
Rollup merge of #152066 - JonathanBrouwer:session_convert, r=jdonszelmann
Convert to inline diagnostics in `rustc_session`

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

r? @jdonszelmann
2026-02-04 14:39:24 +01:00
Jonathan Brouwer
8e361cfa69
Rollup merge of #152065 - JonathanBrouwer:convert_ty_utils, r=lqd
Convert to inline diagnostics in `rustc_ty_utils`

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

r? @jdonszelmann
2026-02-04 14:39:23 +01:00
bjorn3
d2a0557afb Convert to inline diagnostics in all codegen backends 2026-02-04 13:12:49 +00:00
Jonathan Brouwer
0f9b0d3841
Convert to inline diagnostics in rustc_session 2026-02-04 13:22:20 +01:00
Jonathan Brouwer
ae21d43933
Convert to inline diagnostics in rustc_privacy 2026-02-04 08:11:40 +01:00
Jonathan Brouwer
e7c142cc89
Convert to inline diagnostics in rustc_interface 2026-02-04 08:10:10 +01:00
Jonathan Brouwer
7960088392
Rollup merge of #152073 - JonathanBrouwer:convert_mir_dataflow, r=lqd
Convert to inline diagnostics in `rustc_mir_dataflow`

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

r? @jdonszelmann
2026-02-03 23:29:58 +01:00
Jonathan Brouwer
4fdd085e28
Convert to inline diagnostics in rustc_mir_dataflow 2026-02-03 23:25:59 +01:00
Jonathan Brouwer
4cacfc00bc
Convert to inline diagnostics in rustc_incremental 2026-02-03 23:22:48 +01:00
Jonathan Brouwer
d457ffd4f4
Convert to inline diagnostics in rustc_monomorphize 2026-02-03 22:44:22 +01:00
Jonathan Brouwer
590fa1e6cb
Convert to inline diagnostics in rustc_ty_utils 2026-02-03 21:32:03 +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
e5c125f063
Rollup merge of #152019 - nnethercote:rm-unneeded-HashStable-derives, r=Zalathar
`NativeLib` cleanups

Improvements to `NativeLib`.

r? @Zalathar
2026-02-03 18:54:50 +01:00
Jonathan Brouwer
fabcf5aeb8
Rollup merge of #151944 - JonathanBrouwer:diag4, r=jdonszelmann
Convert to inline diagnostics in `rustc_attr_parsing`

Converts a crate for rust-lang/rust#151366
This PR is almost completely autogenerated by a hacky script I have locally :)
2026-02-03 18:54:49 +01:00
Jonathan Brouwer
e0f6b3b665
Rollup merge of #151848 - clubby789:rustc-mir-port, r=JonathanBrouwer
Port `rustc_mir` to attribute parser

Tracking issue: rust-lang/rust#131229
2026-02-03 18:54:48 +01:00
Jonathan Brouwer
13e97ac9b2
Rollup merge of #152045 - JonathanBrouwer:rustc_infer_convert, r=lqd
Convert to inline diagnostics in `rustc_infer`

For https://github.com/rust-lang/rust/issues/151366
2026-02-03 18:54:47 +01:00
Jonathan Brouwer
1722b8e06b
Convert to inline diagnostics in rustc_infer 2026-02-03 15:14:49 +01:00
Jamie Hill-Daniel
b668057d79 Port rustc_mir to attribute parser 2026-02-03 13:55:45 +00:00
Jonathan Brouwer
30f82aac5b
Convert to inline diagnostics in rustc_query_system 2026-02-03 14:01:05 +01:00
Jonathan Brouwer
a9f81ea43e
Convert to inline diagnostics in rustc_attr_parsing 2026-02-03 09:59:11 +01:00
Jonathan Brouwer
c07f10c2c1
Convert to inline diagnostics in rustc_driver_impl 2026-02-03 08:51:31 +01:00
Nicholas Nethercote
1c4940b2be Remove an unneeded HashStable derive.
This has the nice side-effect of eliminating `rustc_codegen_ssa`'s
dependency on `rustc_query_system`. (Indeed, looking through such
dependencies was how I found this.)
2026-02-03 12:56:00 +11: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
d853e9e1d6
Rollup merge of #151890 - Zalathar:hash-table, r=Kivooeo
Re-export `hashbrown::hash_table` from `rustc_data_structures`

We don't always re-export shared dependencies, but for `hashbrown::hash_table` I think it makes sense, for a few reasons:

- The lower-level `HashTable` type is already part of the public API of `rustc_data_structures` via the `ShardedHashMap` type alias, and other compiler crates currently depend on being able to access its internal hash tables.
- The `Cargo.toml` entry for `hashbrown` is non-trivial, making it harder to keep in sync and harder to move between crates as needed.
  - [And we currently aren't using `[workspace.dependencies]` for various reasons.](https://github.com/rust-lang/rust/pull/146113)
- It's fine for other compiler crates to use `hash_table` specifically (with care), but they probably shouldn't be using the higher-level `hashbrown::HashMap` and `hashbrown::HashSet` types directly, because they should prefer the various map/set aliases defined by `rustc_data_structures`. Re-exporting only `hash_table` helps to discourage use of those other types.

There should be no change to compiler behaviour.
2026-01-31 21:42:47 +01:00
Matthias Krüger
df7d12a24d
Rollup merge of #151262 - Shunpoco:tidy-clap, r=Zalathar
Introducing clap on tidy

### Context
Currently tidy parses paths/flags from args_os manually, and the extraction is spreading multiple files. It may be a breeding ground for bugs.

ref: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/How.20--ci.3Dtrue.20interact.20with.20CiEnv.3F/near/543171560
(N.B. We've talked about introducing a ci flag in tidy in that thread, but I don't do it in this PR as I don't want to put multiple changes into a PR. I will introduce the flag in a coming PR.)

### Changes
This PR replaces current parsing logic with clap. To confirm the new parser works fine, I introduce an unit test for it.

### Build time
We've concerned about how clap increases the build time. In order to confirm the increment is acceptable, I did an experiment on CI:
- Run cargo build without cache for tidy 50 times in each environment on CI
- Calculate an average and a standard deviation from the result, and plot them

Here is the graph:
<img width="943" height="530" alt="rust_tidy_build_time" src="https://github.com/user-attachments/assets/c7deee69-9f38-4044-87dc-76d6e7384f76" />

- Clap tends to increase build time ~2s. We think this is not a big problem
- Build time differs in each environment
- In some cases standard deviation are high, I suppose that busyness of CI instances affect build time
2026-01-31 10:41:52 +01:00
Zalathar
04e6afe20a Re-export hashbrown::hash_table from rustc_data_structures 2026-01-31 14:48:50 +11:00
Guillaume Gomez
6397395362 Update askama version to 0.15.4 2026-01-29 17:08:19 +01:00
Shunpoco
59c77c43d9 use clap on tidy
Current tidy parses paths and options manually, and parsing is spreading multple files. This commit introduces a parser using clap to clean and centralize it.
2026-01-29 08:11:49 +00:00
Guillaume Gomez
e1417f408e Update askama to 0.15.3 2026-01-28 22:06:18 +01:00
Stuart Cook
0f63f2a77e
Rollup merge of #151747 - GuillaumeGomez:update-askama, r=jieyouxu
Update `askama` version to `0.15.2`

Link to new release is [here](https://github.com/askama-rs/askama/releases/tag/v0.15.2). Basically improves a few things and remove some warnings.

r? @jieyouxu
2026-01-28 19:03:53 +11:00
Guillaume Gomez
4ae692df6f Update askama version to 0.15.2 2026-01-27 16:47:26 +01:00
Stuart Cook
af523529be
Rollup merge of #151529 - tgross35:lint-apfloat, r=nnethercote
lint: Use rustc_apfloat for `overflowing_literals`, add f16 and f128

Switch to parsing float literals for overflow checks using `rustc_apfloat` rather than host floats. This avoids small variations in platform support and makes it possible to start checking `f16` and `f128` as well.

Using APFloat matches what we try to do elsewhere to avoid platform inconsistencies.
2026-01-27 12:50:52 +11:00
Trevor Gross
9b15010686 lint: Use rustc_apfloat for overflowing_literals, add f16 and f128
Switch to parsing float literals for overflow checks using
`rustc_apfloat` rather than host floats. This avoids small variations in
platform support and makes it possible to start checking `f16` and
`f128` as well.

Using APFloat matches what we try to do elsewhere to avoid platform
inconsistencies.
2026-01-26 18:25:42 -06:00
Chris Denton
aaeb550f6f
Update windows bindings in std 2026-01-26 10:59:16 +00:00