Open jyn514 opened 5 hours ago
also this is a bit of a larger change, but it would be nice if rustc never broke up a diagnostic across a type name. it means that it's harder to visually parse, it has bad degenerate behavior when the types are long, and it doesn't really seem more clear than, e.g., "a trait bound was not satisfied: Then<...>: CSTParser
"
i think the the whole ", which is required by ..." clause shouldn't be there either tbh - it's already in a note
below, and it's right in the middle of the span making it harder to see the rest of the diagnostic.
Code
Current output
Desired output
expected `((), ())`, found `()`
should be highlighted instead ofis implemented for `Then<...>`
ParserSealed<((), ())>
andParserSealed<()>
should be highlighted.ws().then()
line is related (from the spans, it looks like this is an error at the level of the function signature, not the function implementation)Rationale and extra context
Other cases
No response
Rust Version
rustc 1.84.0-nightly (662180b34 2024-10-20) binary: rustc commit-hash: 662180b34d95f72d05b7c467b0baf4d23d36b1e1 commit-date: 2024-10-20 host: x86_64-unknown-linux-gnu release: 1.84.0-nightly LLVM version: 19.1.1
Anything else?
No response