-
Notifications
You must be signed in to change notification settings - Fork 924
Rustfmt fails with 'line exceeded max length' on use of thread_local! #611
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
Comments
Yeah, likely to be because it's a macro use. We ought to be able to fix this eventually, but it is a little more challenging than other stuff. In the mean time, if you manually fix it up (to fit within the line limit), Rustfmt shouldn't break your formatting. |
perhaps certain common macros that are built-in to rust should be whitelisted as being equivalent to function calls? I ran into this with assert_eq! too |
We actually try to format all macro calls as if they were functions, but sometimes that doesn't work and then we pretty much give up. I would have thought assert_eq would get reformatted properly though. |
hm. well, I reported (and then closed) a case of assert_eq! not being formatted properly in #1868, maybe that's worth double-checking... |
Rustfmt fails with
Rustfmt failed at ./base/src\interner.rs:163: line exceeded maximum length (sorry)
when I run it against the crate base of embed_lang.diff
I would guess that this is because formatting macros are tricky or even impossible in some cases. Might need a better error message if it is not deemed possible however.
The text was updated successfully, but these errors were encountered: