rust/compiler/rustc_builtin_macros/src
jyn d50a8d5fb3 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.
2025-04-13 16:46:02 -04:00
..
assert Move ast::Item::ident into ast::ItemKind. 2025-04-01 14:08:57 +11:00
deriving Move ast::Item::ident into ast::ItemKind. 2025-04-01 14:08:57 +11:00
format_foreign Rustfmt 2025-02-08 22:12:13 +00:00
alloc_error_handler.rs Move ast::Item::ident into ast::ItemKind. 2025-04-01 14:08:57 +11:00
asm.rs Move ast::Item::ident into ast::ItemKind. 2025-04-01 14:08:57 +11:00
assert.rs Speed up Parser::expected_token_types. 2024-12-19 16:05:41 +11:00
autodiff.rs emit a better error message for using the macro incorrectly 2025-04-08 21:54:34 -04:00
cfg.rs Speed up Parser::expected_token_types. 2024-12-19 16:05:41 +11:00
cfg_accessible.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
cfg_eval.rs Deduplicate assoc item cfg handling 2025-03-25 10:11:56 +00:00
cmdline_attrs.rs Improve -Z crate-attr diagnostics 2025-04-13 16:46:02 -04:00
compile_error.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
concat.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
concat_bytes.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
concat_idents.rs Rollup merge of #134161 - nnethercote:overhaul-token-cursors, r=spastorino 2024-12-18 22:56:53 +08:00
contracts.rs Fix imports, remove attrs for unused_* 2025-02-10 20:15:30 +00:00
define_opaque.rs Test define opaques in extern items 2025-03-25 16:44:59 +00:00
derive.rs Use Ident::dummy() in dummy_annotatable. 2025-03-25 16:14:27 +11:00
edition_panic.rs use slice::contains where applicable 2025-03-28 12:21:21 +00:00
env.rs Rustfmt 2025-02-08 22:12:13 +00:00
errors.rs Improve -Z crate-attr diagnostics 2025-04-13 16:46:02 -04:00
format.rs Simplify printf and shell format suggestions 2025-03-06 13:55:05 -08:00
format_foreign.rs Simplify printf and shell format suggestions 2025-03-06 13:55:05 -08:00
global_allocator.rs Move ast::Item::ident into ast::ItemKind. 2025-04-01 14:08:57 +11:00
lib.rs Allow builtin macros to be used more than once. 2025-03-19 14:12:47 +01:00
log_syntax.rs Adjust some pubs. 2024-04-26 13:29:20 +10:00
pattern_type.rs Add a TyPat in the AST to reuse the generic arg lowering logic 2025-02-11 08:51:05 +00:00
proc_macro_harness.rs Rename some name variables as ident. 2025-04-10 09:30:55 +10:00
source_util.rs tree-wide: parallel: Fully removed all Lrc, replaced with Arc 2025-02-03 13:25:57 +03:00
standard_library_imports.rs Move ast::Item::ident into ast::ItemKind. 2025-04-01 14:08:57 +11:00
test.rs Move ast::Item::ident into ast::ItemKind. 2025-04-01 14:08:57 +11:00
test_harness.rs Move ast::Item::ident into ast::ItemKind. 2025-04-01 14:08:57 +11:00
trace_macros.rs Rollup merge of #134161 - nnethercote:overhaul-token-cursors, r=spastorino 2024-12-18 22:56:53 +08:00
util.rs Account for format_args in HiddenUnicodeCodepoints lint 2024-12-31 05:03:22 +00:00