Skip to content

Potential error in error (warning) message #23224

Closed
@homebru

Description

@homebru

I am too new at rust to know if this is really an issue or not.

I was trying to get the sample "guess" program to work. At one point I got this warning:

warning: pattern binding Less is named the same as one of the variants of the type core::cmp::Ordering [E0170]

So I change my namespace to use 'core' and I got this error:

error: failed to resolve. Use of undeclared type or module core::cmp::Ordering

In the end, the solution was to use "std::cmp::Ordering::Less" - so the bug(?) is the warning message steering me to the wrong namespace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions