mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
![]() This commit has no behavioral changes. This refactor moves the logic for turning a `D: Diagnostic` into an `annotate_snippets::Message` into its own types. This would ideally just be a function or something, but the `annotate-snippets` types want borrowed data, and sometimes we need to produce owned data. So we gather everything we need into our own types and then spit it back out in the format that `annotate-snippets` wants. This factor was motivated by wanting to render multiple snippets. The logic for generating a code frame is complicated enough that it's worth splitting out so that we can reuse it for other spans. (Note that one should consider this prototype-level code. It is unlikely to survive for long.) |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |