Skip to content

Poor error message when forgetting the bang in a macro. #25910

Closed
@Ms2ger

Description

@Ms2ger
fn main() {
    for i in 1..10 {
        println("{}", i);
    }
}

yields (on playpen):

<anon>:3:9: 3:16 error: unresolved name `println`. Did you mean `iter`?
<anon>:3         println("{}", i);
                 ^~~~~~~
error: aborting due to previous error
playpen: application terminated with error code 101

which is not helpful.

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