about summary refs log tree commit diff
path: root/compiler/rustc_query_system/src
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-04-13 23:57:37 -0400
committerGitHub <noreply@github.com>2025-04-13 23:57:37 -0400
commit2b6835bf541d88cf12cbe0153941094e968d8815 (patch)
tree53843ce80aeceb2af047b4b7e87a3581f80112eb /compiler/rustc_query_system/src
parent15f58c46da79399961a09db0c650a2f90f442e6b (diff)
parentd50a8d5fb3727277f82440524e20a67e29dead4c (diff)
downloadrust-2b6835bf541d88cf12cbe0153941094e968d8815.tar.gz
rust-2b6835bf541d88cf12cbe0153941094e968d8815.zip
Rollup merge of #138336 - jyn514:crate-attr-diagnostics, r=compiler-errors
Improve `-Z crate-attr` diagnostics

- Show the `#![ ... ]` in the span (to make it clear that it should not
  be included in the CLI argument)
- Show more detailed errors when the crate has valid token trees but
  invalid syntax.
  Previously, `crate-attr=feature(foo),feature(bar)` would just say
  "invalid crate attribute" and point at the comma. Now, it explicitly
  says that the comma was unexpected, which is useful when using
  `--error-format=short`. It also fixes the column to show the correct
  span.
- Recover from parse errors. Previously we would abort immediately on
  syntax errors; now we go on to try and type-check the rest of the
  crate.

The new diagnostic code also happens to be slightly shorter.

r? diagnostics
Diffstat (limited to 'compiler/rustc_query_system/src')
0 files changed, 0 insertions, 0 deletions