diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-10-24 00:20:04 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-10-25 18:06:39 +0000 |
| commit | aa82fd6d1dd2f2ac6a44dbfa99e1de779b58428a (patch) | |
| tree | 6082435730875b64e0a659c46f351f66eca7586f /tests/ui/impl-trait | |
| parent | 24ac777a641c7efc6d2f6e9a69617800314119f5 (diff) | |
| download | rust-aa82fd6d1dd2f2ac6a44dbfa99e1de779b58428a.tar.gz rust-aa82fd6d1dd2f2ac6a44dbfa99e1de779b58428a.zip | |
Tweak highlighting when trait is available for different type
When printing
```
= help: the trait `chumsky::private::ParserSealed<'_, &'a str, ((), ()), chumsky::extra::Full<EmptyErr, (), ()>>` is implemented for `Then<Ignored<chumsky::combinator::Filter<chumsky::primitive::Any<&str, chumsky::extra::Full<EmptyErr, (), ()>>, {closure@src/main.rs:9:17: 9:27}>, char>, chumsky::combinator::Map<impl CSTParser<'a, O>, O, {closure@src/main.rs:11:24: 11:27}>, (), (), chumsky::extra::Full<EmptyErr, (), ()>>`
= help: for that trait implementation, expected `((), ())`, found `()`
```
Highlight only the `expected` and `found` types, instead of the full type in the first `help`.
Diffstat (limited to 'tests/ui/impl-trait')
| -rw-r--r-- | tests/ui/impl-trait/diagnostics/highlight-difference-between-expected-trait-and-found-trait.svg | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/impl-trait/diagnostics/highlight-difference-between-expected-trait-and-found-trait.svg b/tests/ui/impl-trait/diagnostics/highlight-difference-between-expected-trait-and-found-trait.svg index aaf08b9a246..e09b96e5ff2 100644 --- a/tests/ui/impl-trait/diagnostics/highlight-difference-between-expected-trait-and-found-trait.svg +++ b/tests/ui/impl-trait/diagnostics/highlight-difference-between-expected-trait-and-found-trait.svg @@ -33,9 +33,9 @@ </tspan> <tspan x="10px" y="118px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">|</tspan> </tspan> - <tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Bar<()>` </tspan><tspan class="fg-magenta bold">is</tspan><tspan> implemented for `</tspan><tspan class="fg-magenta bold">Struct</tspan><tspan>`</tspan> + <tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: the trait `Bar<()>` </tspan><tspan class="fg-magenta bold">is</tspan><tspan> implemented for `Struct`</tspan> </tspan> - <tspan x="10px" y="154px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: for that trait implementation, expected `()`, found `i32`</tspan> + <tspan x="10px" y="154px"><tspan> </tspan><tspan class="fg-ansi256-012 bold">= </tspan><tspan class="bold">help</tspan><tspan>: for that trait implementation, expected `</tspan><tspan class="fg-magenta bold">()</tspan><tspan>`, found `</tspan><tspan class="fg-magenta bold">i32</tspan><tspan>`</tspan> </tspan> <tspan x="10px" y="172px"><tspan class="fg-ansi256-010 bold">note</tspan><tspan>: required for `Struct` to implement `Foo<i32>`</tspan> </tspan> |
