Skip to content

uninlined_format_args ignores turbofish #10339

@m-ou-se

Description

@m-ou-se

Summary

uninlined_format_args checks for arguments that are just a simple identifier, but it doesn't seem to see turbofishes 🐟. So, it sees None::<()> as inlineable.

Reproducer

Input:

println!("{:?}", None::<()>);

Clippy's suggestion, with #![deny(clippy::uninlined_format_args)]:

-     println!("{:?}", None::<()>);
+     println!("{None:?}");

Version

rustc 1.69.0-nightly (5b8f28453 2023-02-12)

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions