Skip to content

Chained comparison error doesn't distinguish between < and > #79161

Closed
@varkor

Description

@varkor
fn main() {
    foo<<S as T>::V>();
}

produces the help message:

help: use `::<...>` instead of `<...>` to specify type or const arguments
   |
16 |     foo<<S as T::>::V>();
   |                ^^

This is clearly invalid: we should be distinguishing between < and > when making this suggestion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-genericsArea: const generics (parameters and arguments)A-diagnosticsArea: Messages for errors, warnings, and lintsD-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions