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 pushed for code that LSP doesn't properly parse #10297

Closed
ethanmsl opened this issue Feb 5, 2023 · 1 comment
Closed

Comments

@ethanmsl
Copy link

ethanmsl commented Feb 5, 2023

Description

re: uninlined_format_args

The parsing around rust does not allow syntax highlighting or proper detection of variables embedded in strings.
As such it seems extremely premature to have this lint active.
I (and many other I'm sure) like to have warnings block merges, but this lint actively makes code worse if a user is using (at least some) LSPs. And blocks hover information on the variable.

I'd suggest that, at the least, this lint be downgraded until LSP, treesitter, and related tooling catch up.
(I also generally question whether pushing for inconsistent string embedding of variables improves readability -- since the lint only applies to some cases.)

Below an example of w/ and w/out lint. Without lint, in the context of LSP tooling, being much easier to read and parse and allowing additional tools (like hover information on type):
lint pushing non-parsed code

Version

rustc 1.67.0 (fc594f156 2023-01-24)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: aarch64-apple-darwin
release: 1.67.0
LLVM version: 15.0.6

Additional Labels

No response

@Niki4tap
Copy link
Contributor

Niki4tap commented Feb 5, 2023

Note: uninlined_format_args has been moved to clippy::pedantic category because of this, see:

But this change was done after 1.67.0 was released, I'm not sure if there's anything more that can be done at this point.

@Manishearth Manishearth closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants