Skip to content

uninlined_format_args pushed for code that LSP doesn't properly parse #10297

Closed as not planned
@dream-dasher

Description

@dream-dasher

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

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