Skip to content

print-literal downside #2617

Closed
Closed
@ghost

Description

The new print-literal lint has this warning.

/// Known problems: Will also warn with macro calls as arguments that expand to literals
/// -- e.g., println!("{}", env!("FOO")).

I don't understand how this is a downside. Surely the change from
println!("{}", env!("FOO")) to println!(env!("FOO")) is better for all the same reasons as a regular literal. This was discussed in the pull request #2608 but I don't get it.

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