Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Provide a way to 'anonymize' line numbers when building a Snippet #2

Closed
Labels
E-help-wantedCall for participation: Help is requested to fix this issue
@phansch

Description

@phansch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-help-wantedCall for participation: Help is requested to fix this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp