-
Notifications
You must be signed in to change notification settings - Fork 181
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
Fix "-> Type" on a single line indentation #52
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
Can I just say thank you to the people who wrote this? Incredibly well commented, easy to edit, awesomeness. |
Ah! This is definitely an improvement. I find that there are a lot of other cases where indentation is at least somewhat strange in Nevertheless, this PR works around one of the most common bad cases, so it is still quite helpful. |
Yes, we can work on the rest of the indentation issues later, this is just an issue that I had that was an easy fix. |
@quantheory I'm setting up a new repo in order to work on an SMIE grammar for Rust. Would you like to join me? (I've never done any SMIE work before (and in fact, am an Emacs newbie), so I'd like someone who actually knows what they're doing. Check out the repo. |
@GBGamer I would, but I'm afraid I am really the wrong person to ask. I actually only have a dimly-remembered mental picture of how SMIE works from several years back, and I'm pretty overextended in any case. I really only check in here because I like to |
Pinging @nikomatsakis |
Okay, normally I'd say "please add a test case." But I want this badly enough that I'm probably going to just merge it. (I just want to quickly double-check myself that it behaves as advertised -- if so, then I'll merge it and then work on a test case myself.) |
Yes, awesome, it fixes both of my most important cases: fn foo(a: i32)
-> i32 {
// whoops
}
fn foo<T>(a: i32)
-> i32 where T:Foo {
// bad too
} |
Fix "-> Type" on a single line indentation
Thanks again to @GBGamer !
@pnkfelix Thanks for the regression test, I didn't even think about that 😝 |
Plus a few minor spelling changes in comments
Fixes #8