Commit 284ec9c
committed
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`.1 parent be01dab commit 284ec9c
File tree
1 file changed
+14
-5
lines changed- compiler/rustc_trait_selection/src/error_reporting/traits
1 file changed
+14
-5
lines changedLines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1818 | 1818 | | |
1819 | 1819 | | |
1820 | 1820 | | |
| 1821 | + | |
1821 | 1822 | | |
1822 | 1823 | | |
1823 | 1824 | | |
1824 | 1825 | | |
1825 | 1826 | | |
1826 | 1827 | | |
1827 | 1828 | | |
1828 | | - | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
1829 | 1834 | | |
1830 | 1835 | | |
1831 | 1836 | | |
1832 | 1837 | | |
1833 | 1838 | | |
1834 | | - | |
1835 | | - | |
1836 | | - | |
1837 | | - | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
1838 | 1847 | | |
1839 | 1848 | | |
1840 | 1849 | | |
| |||
0 commit comments