Skip to content

Don't print expression result for dbg!() when expr is literal #63844

Closed
@bjorn3

Description

@bjorn3
fn main() {
    dbg!("Hello, world!");
}

Should give:

[src/main.rs:2] "Hello, world!"

Instead of:

[src/main.rs:2] "Hello, world!" = "Hello, world!"

This should be possible by adding a macro rule matching $val:literal before the rule matching $val:expr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions