Skip to content

End of macro invocation before expected produces EOF #27569

Description

@Wilfred
fn main() {
    let message = "world";
    println!("Hello, {}", message/);
}

This gives the following compile error:



<anon>:3:34: 3:35 error: unexpected token: `<eof>`
<anon>:3     println!("Hello, {}", message/);
                                          ^

I think this is slightly misleading: it's not an EOF at the position where the caret is.

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-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-parserArea: The lexing & parsing of Rust source code to an ASTC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions