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

Build with rust nightly. ExprKind::Catch is now ExprKind::TryBlock. #2964

Closed
wants to merge 2 commits into from

Conversation

zachlute
Copy link
Contributor

Noticed I couldn't build today, so I fixed it.

@zachlute
Copy link
Contributor Author

This fixes the rustfmt build but not the tests, obviously. Changing the tests to use try instead of do catch causes them to fail to build with things like:

error: expected one of `,` or `}`, found `(`
 --> tests/source\catch.rs:5:12
  |
5 |         foo()?
  |            ^ expected one of `,` or `}` here

So it's pretty clear it's not as simple as that, and I may be out of my depth on this one. :)

…re(try_blocks)]`.

Tests still don't build, but I think this is MORE correct?
@topecongiro
Copy link
Contributor

Thank you for the PR! Unfortunately there seems to be large amount of unnecessary diffs, which makes reviewing this hard. Would you fix it please?

From this PR it seems that try block requires edition 2018, so you probably need to add // rustfmt-edition: Edition2018 at the top of the test file.

@zachlute
Copy link
Contributor Author

Oh man, sorry about the diffs. No idea what happened there. I guess it's probably line endings. Adding the // rustfmt-edition lines did fix a few of my problems, though. I'll try to fix this up now. Thanks!

@zachlute
Copy link
Contributor Author

Killing this in favor of #2965 where I DIDN'T mess up all the line endings. I'm not good enough with git yet to know how to repair this branch sanely. :)

@zachlute zachlute closed this Aug 26, 2018
@zachlute zachlute deleted the fix-rust-nightly branch August 27, 2018 00:27
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.

2 participants