rust/compiler/rustc_errors/src
Matthias Krüger 7e3d872bc0
Rollup merge of #136415 - estebank:highlight-clarification, r=compiler-errors
Highlight clarifying information in "expected/found" error

When the expected and found types have the same textual representation, we add clarifying in parentheses. We now visually highlight it in the output.

Detect a corner case where the clarifying information would be the same for both types and skip it, as it doesn't add anything useful.

![Screenshot of the rustc highlighted output on the terminal](https://github.com/user-attachments/assets/aa4b9433-5332-4941-b2c2-1a43e5cadff7)
2025-02-02 18:05:24 +01:00
..
json don't ICE when emitting linker errors during -Z link-only 2025-01-20 16:46:45 -05:00
markdown chore: fix some typos 2024-12-18 23:23:44 +08:00
annotate_snippet_emitter_writer.rs Store a single copy of the error registry in DiagCtxt 2024-12-06 18:42:31 +00:00
codes.rs Stop using String for error codes. 2024-01-29 07:41:41 +11:00
diagnostic.rs Rollup merge of #136415 - estebank:highlight-clarification, r=compiler-errors 2025-02-02 18:05:24 +01:00
diagnostic_impls.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
emitter.rs Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
error.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
json.rs don't ICE when emitting linker errors during -Z link-only 2025-01-20 16:46:45 -05:00
lib.rs Make comma separated lists of anything easier to make for errors 2025-01-31 20:36:44 +00: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 Add warn(unreachable_pub) to rustc_errors. 2024-08-27 12:03:37 +10:00
styled_buffer.rs Add warn(unreachable_pub) to rustc_errors. 2024-08-27 12:03:37 +10:00
tests.rs Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
translation.rs Convert Option<&Lrc<T>> return types to Option<&T>. 2024-10-07 13:56:29 +11:00