File tree 3 files changed +3
-3
lines changed 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ fn main() {
25
25
26
26
- Show that a variable's scope is limited by adding a ` b ` in the inner block in
27
27
the last example, and then trying to access it outside that block.
28
- - Shadowing is different from mutation, because after shadowing both variable's
28
+ - Shadowing is different from mutation, because after shadowing both variables'
29
29
memory locations exist at the same time. Both are available under the same
30
30
name, depending where you use it in the code.
31
31
- A shadowing variable can have a different type.
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ fn main() {
30
30
31
31
<details >
32
32
33
- Note that ` loop ` is the only looping construct which can returns a non-trivial
33
+ Note that ` loop ` is the only looping construct which can return a non-trivial
34
34
value. This is because it's guaranteed to only return at a ` break ` statement
35
35
(unlike ` while ` and ` for ` loops, which can also return when the condition
36
36
fails).
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ fn main() {
29
29
can be used for early return, but the "bare value" form is idiomatic at the
30
30
end of a function (refactor ` gcd ` to use a ` return ` ).
31
31
- Some functions have no return value, and return the 'unit type', ` () ` . The
32
- compiler will infer this if the ` -> () ` return type is omitted.
32
+ compiler will infer this if the return type is omitted.
33
33
- Overloading is not supported -- each function has a single implementation.
34
34
- Always takes a fixed number of parameters. Default arguments are not
35
35
supported. Macros can be used to support variadic functions.
You can’t perform that action at this time.
0 commit comments