36 releases
| 0.12.10 | Dec 1, 2025 |
|---|---|
| 0.12.9 | Nov 15, 2025 |
| 0.12.8 | Oct 28, 2025 |
| 0.11.5 | Dec 9, 2024 |
| 0.1.0 | May 22, 2018 |
#32 in Command-line interface
1,413,571 downloads per month
Used in 401 crates
(84 directly)
195KB
3.5K
SLoC
Format [diagnostic reports][Report], including highlighting snippets of text
Example
Visual overview
Primary group
error: cannot construct `Box<_, _>` with struct literal syntax due to private fields
Annotation on a Snippet
╭▸ $DIR/multi-suggestion.rs:17:13
│
17 │ let _ = Box {};
│ ━━━
│
╰ note: private fields `0` and `1` that were not provided
Secondary group: suggested fix
Title (proposed solution)
help: you might have meant to use an associated function to build this type
╭╴
21 - let _ = Box {};
21 + let _ = Box::new(_);
├╴
├╴
17 - let _ = Box {};
17 + let _ = Box::new_uninit();
├╴
etc for Options 3 and 4
╰ and 12 other candidates
Secondary group: alternative suggested fix
Title (proposed solution)
help: consider using the `Default` trait
╭╴
17 - let _ = Box {};
17 + let _ = <Box as std::default::Default>::default();
╰╴
Cargo features
-
simd- Speeds up folding -
testing-colors- Makes Renderer::styled colors OS independent, which allows for easier testing when testing colored output. It should be added as a feature in[dev-dependencies], which can be done with the following command:
cargo add annotate-snippets --dev --feature testing-colors
annotate-snippets
Format diagnostic reports, including highlighting snippets of text
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/license/mit)
at your option.
Dependencies
~1.5MB
~24K SLoC