From ec2ba63f14b07017db488dd378ec2b744635c190 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Sat, 6 Jul 2024 03:16:46 +0000 Subject: [PATCH] Replace "Example:" with "For example:" 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. --- src/items/use-declarations.md | 6 +++--- src/paths.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/items/use-declarations.md b/src/items/use-declarations.md index 76c257082..164fe9133 100644 --- a/src/items/use-declarations.md +++ b/src/items/use-declarations.md @@ -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 @@ -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 { @@ -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 { diff --git a/src/paths.md b/src/paths.md index b3097dedd..1e2c59561 100644 --- a/src/paths.md +++ b/src/paths.md @@ -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};