Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify and fix grammatical errors #2347

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/control-flow-basics/blocks-and-scopes/scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn main() {

- Show that a variable's scope is limited by adding a `b` in the inner block in
the last example, and then trying to access it outside that block.
- Shadowing is different from mutation, because after shadowing both variable's
- Shadowing is different from mutation, because after shadowing both variables'
memory locations exist at the same time. Both are available under the same
name, depending where you use it in the code.
- A shadowing variable can have a different type.
Expand Down
2 changes: 1 addition & 1 deletion src/control-flow-basics/break-continue.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fn main() {

<details>

Note that `loop` is the only looping construct which can returns a non-trivial
Note that `loop` is the only looping construct which can return a non-trivial
value. This is because it's guaranteed to only return at a `break` statement
(unlike `while` and `for` loops, which can also return when the condition
fails).
Expand Down
2 changes: 1 addition & 1 deletion src/control-flow-basics/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn main() {
can be used for early return, but the "bare value" form is idiomatic at the
end of a function (refactor `gcd` to use a `return`).
- Some functions have no return value, and return the 'unit type', `()`. The
compiler will infer this if the `-> ()` return type is omitted.
compiler will infer this if the return type is omitted.
- Overloading is not supported -- each function has a single implementation.
- Always takes a fixed number of parameters. Default arguments are not
supported. Macros can be used to support variadic functions.
Expand Down