Skip to content

Underscore in format! named substitutions causes "unterminated format string" error #9119

Closed
@huonw

Description

@huonw
fn main() {
    format!("{foo_bar}", foo_bar = "bad underscore")
}
underscore.rs:2:12: 2:23 error: unterminated format string
underscore.rs:2     format!("{foo_bar}", foo_bar = "bad underscore")
                            ^~~~~~~~~~~
error: aborting due to previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-syntaxextArea: Syntax extensions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions