-
Notifications
You must be signed in to change notification settings - Fork 926
Overlong function signature #1049
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
Another example:
|
How is this possible? |
Since this is tagged easy, how might one go about fixing it (and #1048)? |
I would start here: https://github.com/rust-lang-nursery/rustfmt/blob/master/src/items.rs#L1221 and insert a bunch of printlns (or use a debugger) to figure out the path the code is taking and the widths being passed down to the helper functions, at some point it should be clear that a helper is being asked to format into a width that is one larger than it ought to be. Whilst not being a lot of fun, this is usually quite easy to figure out. Exactly how to fix it depends on what the problem looks like. It might be as simple as adding a constant |
whoops sorry made a mistake. Hi! I'm new to rust and took at shot that this issue. |
@juicejitsu Great! @nrc can you help @juicejitsu land this fix? Looks like they've got a patch ready to go. |
@juicejitsu I had the same idea like you but there are at least two corner cases which have to be considered. Please have a look at #1089. Maybe you want to finish that PR? Sadly I have nearly no spare time right now... |
@dawirstejeck Sure! Taking a look |
This can be closed now, right? |
The text was updated successfully, but these errors were encountered: