You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide appropriate suggestions for some of the discussed await syntaxes #60613
Regardless of the final syntax selected for await, given the prevalence of prefix keyword in other languages, and the possibility of thinking it is a method, the parser should support these syntaxes and error with an appropriate targeted diagnostic. Furthermore, should the field or method syntax were to be chosen, we should have reasonable behavior with explanations when accidentally using await when trying to access a field or call a similar method both inside and outside of async blocks.
Reacted by varkor, Mazdak Farrokhzad, Jeff Parsons, Jörn Huxhorn, Philipp Oppermann and Manish Goregaokar
Activity
estebank commentedon May 7, 2019
Some of the cases to have tests for:
And we should have
structs that have both similar method and field names, includingr#await.Centril commentedon May 7, 2019
As long as you make sure that this doesn't stabilize the syntax (i.e. you need to account for macros) then I think this is a good idea.
estebank commentedon May 7, 2019
cc #60586
Rollup merge of rust-lang#60873 - estebank:bad-await, r=Centril