FuelLabs/sway

Delete redundant spans in `sway_error::error`

Open

#4,818 创建于 2023年7月18日

在 GitHub 查看
 (7 评论) (0 反应) (1 负责人)Rust (61,702 star) (5,421 fork)batch import
ODHack13compilercompiler: uigood first issuemay be rewardedteam:compiler

描述

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.

贡献者指南

Delete redundant spans in `sway_error::error` · FuelLabs/sway#4818 | Good First Issue