Skip to content

Commit

Permalink
Replace "Example:" with "For example:"
Browse files Browse the repository at this point in the history
It's a bit more common throughout the Reference, including even within
this PR, to say "For example:" rather than just "Example:", and it's
more grammatically regular, so let's fix up the ones that went the
other way in this branch.
  • Loading branch information
traviscross committed Jul 6, 2024
1 parent 8d065a7 commit ec2ba63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/items/use-declarations.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ The following are restrictions for valid `use` declarations.
* `use {self};` is an error; there must be a leading segment when using `self`.
* As with any item definition, `use` imports cannot create duplicate bindings of the same name in the same namespace in a module or block.
* `use` paths with `$crate` are not allowed in a [`macro_rules`] expansion.
* `use` paths cannot refer to enum variants through a [type alias]. Example:
* `use` paths cannot refer to enum variants through a [type alias]. For example:
```rust,compile_fail
enum MyEnum {
MyVariant
Expand All @@ -341,7 +341,7 @@ The following are restrictions for valid `use` declarations.
Some situations are an error when there is an ambiguity as to which name a `use` declaration refers. This happens when there are two name candidates that do not resolve to the same entity.

Glob imports are allowed to import conflicting names in the same namespace as long as the name is not used.
Example:
For example:

```rust
mod foo {
Expand All @@ -361,7 +361,7 @@ fn main() {
}
```

Multiple glob imports are allowed to import the same name, and that name is allowed to be used, if the imports are of the same item (following re-exports). The visibility of the name is the maximum visibility of the imports. Example:
Multiple glob imports are allowed to import the same name, and that name is allowed to be used, if the imports are of the same item (following re-exports). The visibility of the name is the maximum visibility of the imports. For example:

```rust
mod foo {
Expand Down
2 changes: 1 addition & 1 deletion src/paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ x::y::z;
>    [IDENTIFIER] | `super` | `self` | `crate` | `$crate`
Simple paths are used in [visibility] markers, [attributes], [macros][mbe], and [`use`] items.
Examples:
For example:

```rust
use std::io::{self, Write};
Expand Down

0 comments on commit ec2ba63

Please sign in to comment.