Skip to content

Macros called as functions link to a misleading / inaccurate error index. #42077

Closed
@shepmaster

Description

@shepmaster
fn main() {
    println("");
}

Produces this error with the helpful text:

error[E0423]: expected function, found macro `println`
 --> src/main.rs:2:5
  |
2 |     println("");
  |     ^^^^^^^ did you mean `println!(...)`?

However, if you look at the error index for E0423...

A struct variant name was used like a function name.

That is not useful. This used to point to E0425:

An unresolved name was used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.P-mediumMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions