Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uninlined_format_args ignores turbofish #10339

Closed
m-ou-se opened this issue Feb 13, 2023 · 0 comments · Fixed by #10343
Closed

uninlined_format_args ignores turbofish #10339

m-ou-se opened this issue Feb 13, 2023 · 0 comments · Fixed by #10343
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have

Comments

@m-ou-se
Copy link
Member

m-ou-se commented Feb 13, 2023

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

@m-ou-se m-ou-se added the C-bug Category: Clippy is not doing the correct thing label Feb 13, 2023
@Alexendoo Alexendoo added the I-false-positive Issue: The lint was triggered on code it shouldn't have label Feb 15, 2023
@bors bors closed this as completed in 8754d5a Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants