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

emacs rust-mode: Cannot indent second line of a struct instantiation in some cases #11239

Closed
mwillsey opened this issue Dec 31, 2013 · 2 comments

Comments

@mwillsey
Copy link
Contributor

Example:

Foo {a: 1, b: 2, c: 3,
d: 4, e: 5}

if you indent the second line, it will work and result in:

Foo {a: 1, b: 2, c: 3,
     d: 4, e: 5}

However, if there were a space after the '{':

Foo { a: 1, b: 2, c: 3,
d: 4, e: 5}

you would expect pressing tab on the second line to indent to:

Foo { a: 1, b: 2, c: 3,
      d: 4, e: 5}

instead an error is raised, saying that forward-to-word's definition is void.

@huonw
Copy link
Member

huonw commented Dec 31, 2013

cc #8793 and #8787

@johnwalker
Copy link
Contributor

I just figured this out and am submitting a pull request for the fix.

bors added a commit that referenced this issue Jan 1, 2014
forward-to-word is undefined, and so Emacs would throw errors in
rust-align-to-expr-after-brace. This change yields the expected
behavior discussed in issue #11239 by handling the case when
whitespace follows a left bracket.
@bors bors closed this as completed in 8271ba8 Jan 1, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Aug 14, 2023
Update ui test crate

This update also removes the `//`@run-rustfix`` flag, and just runs rustfix on all tests. This means I had to opt out of running rustfix on ~100 tests, but it also allowed me to remove the rustfix coverage check entirely, as it is now effectively builtin.

changelog: update ui-test crate to 0.13 (automatically runs rustfix on all tests)
flip1995 pushed a commit to flip1995/rust that referenced this issue Aug 14, 2023
…p1995

Do not bless by default in ui tests

This restores the default behaviour to check the `.stderr`, it was changed in rust-lang#11239 to bless by default in `cargo test` (unless in github actions), but check by default in `cargo uitest` which is fairly confusing

It also meant `cargo uitest -F internal` no longer worked

`--bless` prevents the use of `Args::test` but we can look at reintegrating with that after `@oli-obk's` vacation

r? `@flip1995`

changelog: none
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

No branches or pull requests

3 participants