FuelLabs/sway

Delete redundant spans in `sway_error::error`

Offen

#4.818 geöffnet am 18.07.2023

 (7 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Rust (5.421 Forks)batch import
ODHack13compilercompiler: uigood first issuemay be rewardedteam:compiler

Repository-Metriken

Stars
 (61.702 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 22h 6m) (16 gemergte PRs in 30 T)

Beschreibung

Now when Idents are used instead of strings, those redundant spans are really annoying and bloating the code.

See this TODO.

When removing those redundant spans we can have a situation that deduplication of error messages might remove errors that are actually not duplicates because although they point to the same Ident (in terms of name), their Spans can be different. Deduplication works on hashes and Ident's hash contains only the name and not the span.

That's why we should always using IdentUnique.

Contributor Guide