Skip to content

Fix Vim indent regressions from #13600. #13729

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

Merged
merged 1 commit into from
Apr 24, 2014

Conversation

chris-morgan
Copy link
Member

The change in #13600 was incorrect, containing a bad regular expression;
inside an indent function, errors are silently ignored (and the ~=
operation will return 0), so it just always failed, causing the cases
that were supposed to be caught to not be caught and making things like
the match example shown above or struct field definitions regress.

I have fixed the regular expression to what it should have been. This is
still imperfect, of course, not handling cases like where the first
argument to a function is a function call (foo(bar(),), but it'll do
for now.


I have a general request to make of reviewers about any changes made to src/etc/vim: please tell me. As a general rule I want to review them. (I’ll make an exception for changes the prelude; it needs fixing from time to time when some people don’t update the syntax file, anyway.)

cc @brandonw

The change in rust-lang#13600 was incorrect, containing a bad regular expression;
inside an indent function, errors are silently ignored (and the ``~=``
operation will return 0), so it just always failed, causing the cases
that were supposed to be caught to not be caught and making things like
the ``match`` example shown above or struct field definitions regress.

I have fixed the regular expression to what it should have been. This is
still imperfect, of course, not handling cases like where the first
argument to a function is a function call (``foo(bar(),``), but it'll do
for now.
@pnkfelix
Copy link
Member

@chris-morgan hmm, perhaps we should put a note in the source code within src/etc/vim saying people should cc @chris-morgan on PR's? Just a thought; we don't have much in the way of formal process right now with respect to module ownership...

bors added a commit that referenced this pull request Apr 24, 2014
The change in #13600 was incorrect, containing a bad regular expression;
inside an indent function, errors are silently ignored (and the ``~=``
operation will return 0), so it just always failed, causing the cases
that were supposed to be caught to not be caught and making things like
the ``match`` example shown above or struct field definitions regress.

I have fixed the regular expression to what it should have been. This is
still imperfect, of course, not handling cases like where the first
argument to a function is a function call (``foo(bar(),``), but it'll do
for now.

----

I have a general request to make of reviewers about any changes made to `src/etc/vim`: **please tell me**. As a general rule I want to review them. (I’ll make an exception for changes the prelude; it needs fixing from time to time when some people don’t update the syntax file, anyway.)

cc @brandonw
@bors bors closed this Apr 24, 2014
@bors bors merged commit 7266587 into rust-lang:master Apr 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants