rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
14.37k stars 1.62k forks source link

Native diagnostics should support linked/related sub diagnostics #16059

Open Veykril opened 11 months ago

Veykril commented 11 months ago

Very rough information but we now have call and def site information for macros, so a diagnostic originating from the def site should be repoted at the call site with the def site info attached. We should be able to support this. Also needed for other non macro related things, once we track obligation causes and the like.

ChayimFriedman2 commented 1 month ago

One of the things I hate about rustc errors in IDE is how they are split. Please don't repeat that mistake. Marking errors from macros is good, but splitting obligations lead to users reading (and copying) only half of the error.