- Notifications
You must be signed in to change notification settings - Fork47
Closed
Description
In the rust test suite there's the option to replace line numbers in the diagnostics output with letters, so that changes in the output produce less noisy diffs.
With that flag enabled, the following
error: cannot concatenate a byte string literal --> $DIR/concat.rs:2:13 | 2 | concat!(b'f'); | ^^^^is turned into
error: cannot concatenate a byte string literal --> $DIR/concat.rs:2:13 |LL | concat!(b'f'); | ^^^^Any line number is replaced byLL, no matter the digits of that number.
AFAICT, rustc would currently have to implement its ownSnippet -> DisplayList conversion, which would duplicate a lot of the conversion code just to anonymize the line numbers.
I think this would be nice to have insideannotate-snippets too, maybe as an option when constructing a Snippet? I believe other users of this library could also benefit from this option.