Skip to content

parse: towards unified fn grammar#68788

Merged
bors merged 4 commits intorust-lang:masterfrom
Centril:unified-fn-bodies
Feb 6, 2020
Merged

parse: towards unified fn grammar#68788
bors merged 4 commits intorust-lang:masterfrom
Centril:unified-fn-bodies

Conversation

@Centril
Copy link
Contributor

@Centril Centril commented Feb 3, 2020

Part of #68728.

  • Syntactically, fn items in extern { ... } blocks can now have bodies (fn foo() { ... } as opposed to fn foo();). As above, we use semantic restrictions instead.

  • Syntactically, fn items in free contexts (directly in a file or a module) can now be without bodies (fn foo(); as opposed to fn foo() { ... }. As above, we use semantic restrictions instead, including for non-ident parameter patterns.

  • We move towards unifying the fn front matter; this is fully realized in parse: merge fn syntax + cleanup item parsing #68728.

r? @petrochenkov

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

Labels

relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants