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

ANN&GRAM: Add `async/await` and `try` support #3106

Merged
merged 2 commits into from Dec 19, 2018

Conversation

Projects
None yet
7 participants
@mchernyavsky
Member

mchernyavsky commented Dec 3, 2018

Closes #2400. Relates to #2622.

@mchernyavsky mchernyavsky force-pushed the mchernyavsky:keywords-2018 branch from 3022aea to 579eaf6 Dec 4, 2018

@mchernyavsky mchernyavsky changed the title [WIP] ANN+GRAM: Add `async/await` and `try` support ANN&GRAM: Add `async/await` and `try` support Dec 4, 2018

@mchernyavsky mchernyavsky force-pushed the mchernyavsky:keywords-2018 branch from 579eaf6 to 361a06e Dec 7, 2018

@surdus

This comment has been minimized.

surdus commented Dec 9, 2018

Tried this changes. Found that it shows errors for await macro await!(...) and for combination unsafe and async in function declaration unsafe async fn foo() {

@mchernyavsky mchernyavsky force-pushed the mchernyavsky:keywords-2018 branch from 361a06e to 39b151d Dec 10, 2018

@mchernyavsky mchernyavsky force-pushed the mchernyavsky:keywords-2018 branch from 39b151d to 2e1b2c0 Dec 10, 2018

@gilescope

This comment has been minimized.

gilescope commented Dec 13, 2018

🎅 This is on my xmas list :-)
Currently every time autoformatting kicks in it trashes the code's formatting as it doesn't get the depth right. We don't need too much singing and dancing, but if it could stop mauling the code when it autoformats within an async block that would be stella.

@gfreezy

This comment has been minimized.

gfreezy commented Dec 14, 2018

auto complete & goto definition don't work for async fn

@mchernyavsky

This comment has been minimized.

Member

mchernyavsky commented Dec 15, 2018

@gfreezy Can you provide some example code? Auto-completion & resolve work for me:

  • Edition 2015:

Example

  • Edition 2018:

Example

@imkow

This comment has been minimized.

imkow commented Dec 15, 2018

Is this in nightly release?

@Undin

This comment has been minimized.

Member

Undin commented Dec 15, 2018

@imkow no, because this PR is not merged yet

@imkow

This comment has been minimized.

imkow commented Dec 17, 2018

@Undin when will this be merged?

@mchernyavsky

This comment has been minimized.

Member

mchernyavsky commented Dec 17, 2018

@Undin when will this be merged?

@vlad20012 ping

@mchernyavsky mchernyavsky force-pushed the mchernyavsky:keywords-2018 branch 2 times, most recently from 6990268 to c320673 Dec 18, 2018

@mchernyavsky

This comment has been minimized.

Member

mchernyavsky commented Dec 18, 2018

id is not identified as a function.

@gfreezy What do you mean? On attached screenshot everything seems ok.

@mchernyavsky mchernyavsky force-pushed the mchernyavsky:keywords-2018 branch from c320673 to ea5ac8c Dec 18, 2018

@vlad20012

This comment has been minimized.

Member

vlad20012 commented Dec 19, 2018

bors r+

bors bot added a commit that referenced this pull request Dec 19, 2018

Merge #3106
3106: ANN&GRAM: Add `async/await` and `try` support r=vlad20012 a=mchernyavsky

Closes #2400. Relates to #2622.

Co-authored-by: Mikhail Chernyavsky <chemike47@gmail.com>
@bors

This comment has been minimized.

Contributor

bors bot commented Dec 19, 2018

@bors bors bot merged commit ea5ac8c into intellij-rust:master Dec 19, 2018

2 checks passed

bors Build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Undin

This comment has been minimized.

Member

Undin commented Dec 19, 2018

Note, this PR adds only syntax support
Type inference for try expression and all async related things is not implemented yet

@mchernyavsky mchernyavsky deleted the mchernyavsky:keywords-2018 branch Dec 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment