Skip to content

Commit

Permalink
Merge pull request rust-lang#140 from brauliobz/grammar_return_expr
Browse files Browse the repository at this point in the history
Return expression grammar
  • Loading branch information
Havvy authored Oct 16, 2017
2 parents 764a573 + 07eed14 commit 69252ba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/expressions/return-expr.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# `return` expressions

> **<sup>Syntax</sup>**
> _ReturnExpression_ :
> &nbsp;&nbsp; `return` [_Expression_]<sup>?</sup>
Return expressions are denoted with the keyword `return`. Evaluating a `return`
expression moves its argument into the designated output location for the
current function call, destroys the current function activation frame, and
Expand All @@ -15,3 +19,5 @@ fn max(a: i32, b: i32) -> i32 {
return b;
}
```

[_Expression_]: expressions.html

0 comments on commit 69252ba

Please sign in to comment.