Skip to content

#fmt "%?" does not print newline escape char #1890

Closed
@erickt

Description

@erickt

The polymorphic printer for strings does not print out escape characters like \n. Instead it uses the \x0a form. Here's a demonstration:

fn main() {
    #error("%?", "foo\nbar");
}

displays rust: ""foo\x0abar""

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions