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

Fails in some deeply nested method chains sprinkled with indexing #6151

Closed
mi2ebi opened this issue Apr 23, 2024 · 1 comment
Closed

Fails in some deeply nested method chains sprinkled with indexing #6151

mi2ebi opened this issue Apr 23, 2024 · 1 comment

Comments

@mi2ebi
Copy link

mi2ebi commented Apr 23, 2024

Found in an attempt to format this. Haven't found a minimal reproduction yet, sorry

image

rustfmt.toml:

error_on_line_overflow = true
max_width = 100
imports_granularity = "Crate"

Version: rustfmt 1.7.0-nightly (7f2fc33d 2024-04-22)

@ytmimi
Copy link
Contributor

ytmimi commented Apr 23, 2024

It's the long string literal on line 86 thats preventing formatting. rustfmt can't fit that string literal within the max_width so it fails to reformat the entire method call chain.

This is another duplicate of #3863

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

No branches or pull requests

2 participants