rust/compiler/rustc_errors/src
Matthias Krüger 215d7b661e
Rollup merge of #148717 - estebank:macro-spans-2, r=petrochenkov
Point at span within local macros even when error happens in nested external macro

Address issue noticed at https://users.rust-lang.org/t/error-message-does-not-specify-where-in-macro/135157/1. On errors occurring within a macro expansion, point at the innermost local macro expansion point.

```
error[E0308]: mismatched types
  --> $DIR/macro-span-caller-replacement.rs:5:17
   |
LL |             s = format!("{arg}");
   |                 ^^^^^^^^^^^^^^^^ expected `&str`, found `String`
...
LL |     macro_with_format!();
   |     -------------------- in this macro invocation
   |
   = note: this error originates in the macro `format` which comes from the expansion of the macro `macro_with_format` (in Nightly builds, run with -Z macro-backtrace for more info)
```
2025-12-11 22:09:53 +01:00
..
json refactor: Make short a field on HumanReadableErrorType varinants 2025-11-05 09:01:07 -07:00
markdown chore: Remove unneeded ansi escape resets from output 2025-10-20 12:13:26 -06:00
annotate_snippet_emitter_writer.rs fix: Only show one origin for multiline annotations with no source 2025-11-18 19:26:02 -07:00
codes.rs remove duplicated columns from rustc_error_code::error_codes! 2025-09-27 12:29:54 +02:00
decorate_diag.rs Refactor lint buffering to avoid requiring a giant enum 2025-08-22 01:59:56 -07:00
diagnostic.rs Revert "Auto merge of #146121 - Muscraft:filter-suggestion-parts, r=petrochenkov" 2025-10-23 18:18:35 +00:00
diagnostic_impls.rs Move IntoDiagArg earlier in the dependency chains 2025-08-20 15:01:13 -07:00
emitter.rs Point at span within local macros even when error happens in nested external macro 2025-12-10 19:27:40 +00:00
error.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
json.rs refactor: Make short a field on HumanReadableErrorType varinants 2025-11-05 09:01:07 -07:00
lib.rs Rollup merge of #146584 - cyrgani:error-codes-macro, r=GuillaumeGomez 2025-12-11 22:09:52 +01:00
lock.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
registry.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
snippet.rs Use abs_diff where applicable 2025-03-27 18:29:06 +00:00
styled_buffer.rs use let chains in ast, borrowck, codegen, const_eval 2025-07-28 06:08:48 +05:00
tests.rs Extract Translator struct 2025-06-19 13:02:04 -05:00
timings.rs Add codegen timing section 2025-06-23 08:50:17 +02:00
translation.rs Extract Translator struct 2025-06-19 13:02:04 -05:00