FuelLabs/sway

Delete redundant spans in `sway_error::error`

開放

#4,818 建立於 2023年7月18日

 (7 則留言) (0 個反應) (1 位負責人)Rust (5,421 個分叉)batch import
ODHack13compilercompiler: uigood first issuemay be rewardedteam:compiler

倉庫指標

星標
 (61,702 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南