Skip to content

Support rustc_confusables on items other than methods #124273

Description

@estebank

As a follow up #120730, #[doc(alias = "name")] and #[rustc_confusables(..)] should be supported on all items, so that the following

#[doc(alias = "plus")]
fn add(a: i32, b: i32) -> i32 { a + b }

fn main() {
    let _ = plus(1, 2);
}

the resolve error for plus should mention add as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`D-papercutDiagnostics: An error or lint that needs small tweaks.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.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