Skip to content

Wrong error message when using Self in some places #24968

Closed
@bombless

Description

@bombless
fn foo(_: Self) {}

fn main() {}
<anon>:1:11: 1:15 error: use of undeclared type name `Self`
<anon>:1 fn foo(_: Self) {}
                   ^~~~

Self is a keyword, this error message indicates that it can be used to define type, which is misleading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions