File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ fn main() {
2525
2626- Show that a variable's scope is limited by adding a ` b ` in the inner block in
2727 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'
2929 memory locations exist at the same time. Both are available under the same
3030 name, depending where you use it in the code.
3131- A shadowing variable can have a different type.
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ fn main() {
3030
3131<details >
3232
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
3434value. This is because it's guaranteed to only return at a ` break ` statement
3535(unlike ` while ` and ` for ` loops, which can also return when the condition
3636fails).
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ fn main() {
2929 can be used for early return, but the "bare value" form is idiomatic at the
3030 end of a function (refactor ` gcd ` to use a ` return ` ).
3131- 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.
3333- Overloading is not supported -- each function has a single implementation.
3434 - Always takes a fixed number of parameters. Default arguments are not
3535 supported. Macros can be used to support variadic functions.
You can’t perform that action at this time.
0 commit comments