Skip to content

Commit 0635f91

Browse files
authored
Merge pull request #1586 from ehuss/edition-differences-capitalization
Be consistent about how "Edition differences" is capitalized
2 parents a80c4a7 + 0c7f99a commit 0635f91

11 files changed

+18
-18
lines changed

docs/authoring.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,4 @@ The reference does not document which targets exist, or the properties of specif
154154

155155
### Editions
156156

157-
The main text and flow should document only the current edition. Whenever there is a difference between editions, the differences should be called out with an "Edition Differences" block.
157+
The main text and flow should document only the current edition. Whenever there is a difference between editions, the differences should be called out with an "Edition differences" block.

src/expressions/method-call-expr.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Once a method is looked up, if it can't be called for one (or more) of those rea
6666
If a step is reached where there is more than one possible method, such as where generic methods or traits are considered the same, then it is a compiler error.
6767
These cases require a [disambiguating function call syntax] for method and function invocation.
6868
69-
> **Edition Differences**: Before the 2021 edition, during the search for visible methods, if the candidate receiver type is an [array type], methods provided by the standard library [`IntoIterator`] trait are ignored.
69+
> **Edition differences**: Before the 2021 edition, during the search for visible methods, if the candidate receiver type is an [array type], methods provided by the standard library [`IntoIterator`] trait are ignored.
7070
>
7171
> The edition used for this purpose is determined by the token representing the method name.
7272
>

src/introduction.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ These conventions are documented here.
8282

8383
An *example term* is an example of a term being defined.
8484

85-
* Differences in the language by which edition the crate is compiled under are in a blockquote that start with the words "Edition Differences:" in **bold**.
85+
* Differences in the language by which edition the crate is compiled under are in a blockquote that start with the words "Edition differences:" in **bold**.
8686

87-
> **Edition Differences**: In the 2015 edition, this syntax is valid that is disallowed as of the 2018 edition.
87+
> **Edition differences**: In the 2015 edition, this syntax is valid that is disallowed as of the 2018 edition.
8888
8989
* Notes that contain useful information about the state of the book or point out useful, but mostly out of scope, information are in blockquotes that start with the word "Note:" in **bold**.
9090

src/items/associated-items.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ let circle_shape = Circle::new();
189189
let bounding_box = circle_shape.bounding_box();
190190
```
191191

192-
> **Edition Differences**: In the 2015 edition, it is possible to declare trait
192+
> **Edition differences**: In the 2015 edition, it is possible to declare trait
193193
> methods with anonymous parameters (e.g. `fn foo(u8)`). This is deprecated and
194194
> an error as of the 2018 edition. All parameters must have an argument name.
195195

src/macros-by-example.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ the `expr` fragment specifier. However, `_` is matched by the `expr` fragment
148148
specifier when it appears as a subexpression.
149149
For the same reason, a standalone [const block] is not matched but it is matched when appearing as a subexpression.
150150

151-
> **Edition Differences**: Starting with the 2021 edition, `pat` fragment-specifiers match top-level or-patterns (that is, they accept [_Pattern_]).
151+
> **Edition differences**: Starting with the 2021 edition, `pat` fragment-specifiers match top-level or-patterns (that is, they accept [_Pattern_]).
152152
>
153153
> Before the 2021 edition, they match exactly the same fragments as `pat_param` (that is, they accept [_PatternNoTopAlt_]).
154154
>
@@ -421,7 +421,7 @@ macro_rules! call_foo {
421421
fn foo() {}
422422
```
423423

424-
> **Version & Edition Differences**: Prior to Rust 1.30, `$crate` and
424+
> **Version & Edition differences**: Prior to Rust 1.30, `$crate` and
425425
> `local_inner_macros` (below) were unsupported. They were added alongside
426426
> path-based imports of macros (described above), to ensure that helper macros
427427
> did not need to be manually imported by users of a macro-exporting crate.
@@ -475,7 +475,7 @@ Matchers like `$i:expr,` or `$i:expr;` would be legal, however, because `,` and
475475
`ident`, `ty`, or `path` fragment specifier.
476476
* All other fragment specifiers have no restrictions.
477477

478-
> **Edition Differences**: Before the 2021 edition, `pat` may also be followed by `|`.
478+
> **Edition differences**: Before the 2021 edition, `pat` may also be followed by `|`.
479479
480480
When repetitions are involved, then the rules apply to every possible number of
481481
expansions, taking separators into account. This means:

src/names/preludes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ new_name`, then the symbol `new_name` is instead added to the prelude.
4444
The [`core`] crate is always added to the extern prelude. The [`std`] crate is
4545
added as long as the [`no_std` attribute] is not specified in the crate root.
4646

47-
> **Edition Differences**: In the 2015 edition, crates in the extern prelude
47+
> **Edition differences**: In the 2015 edition, crates in the extern prelude
4848
> cannot be referenced via [use declarations], so it is generally standard
4949
> practice to include `extern crate` declarations to bring them into scope.
5050
>
@@ -132,7 +132,7 @@ module or any of its descendants.
132132
133133
This attribute does not affect the [language prelude].
134134
135-
> **Edition Differences**: In the 2015 edition, the `no_implicit_prelude`
135+
> **Edition differences**: In the 2015 edition, the `no_implicit_prelude`
136136
> attribute does not affect the [`macro_use` prelude], and all macros exported
137137
> from the standard library are still included in the `macro_use` prelude.
138138
> Starting in the 2018 edition, it will remove the `macro_use` prelude.

src/paths.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Paths starting with `::` are considered to be *global paths* where the segments
166166
start being resolved from a place which differs based on edition. Each identifier in
167167
the path must resolve to an item.
168168

169-
> **Edition Differences**: In the 2015 Edition, identifiers resolve from the "crate root"
169+
> **Edition differences**: In the 2015 Edition, identifiers resolve from the "crate root"
170170
> (`crate::` in the 2018 edition), which contains a variety of different items, including
171171
> external crates, default crates such as `std` or `core`, and items in the top level of
172172
> the crate (including `use` imports).

src/patterns.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ For example, `0u8..=255u8` is irrefutable.
533533
The range of values for an integer type is the closed range from its minimum to maximum value.
534534
The range of values for a `char` type are precisely those ranges containing all Unicode Scalar Values: `'\u{0000}'..='\u{D7FF}'` and `'\u{E000}'..='\u{10FFFF}'`.
535535

536-
> **Edition Differences**: Before the 2021 edition, range patterns with both a lower and upper bound may also be written using `...` in place of `..=`, with the same meaning.
536+
> **Edition differences**: Before the 2021 edition, range patterns with both a lower and upper bound may also be written using `...` in place of `..=`, with the same meaning.
537537
538538
## Reference patterns
539539

src/tokens.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ c"\u{00E6}";
375375
c"\xC3\xA6";
376376
```
377377

378-
> **Edition Differences**: C string literals are accepted in the 2021 edition or
378+
> **Edition differences**: C string literals are accepted in the 2021 edition or
379379
> later. In earlier additions the token `c""` is lexed as `c ""`.
380380
381381
#### Raw C string literals
@@ -400,7 +400,7 @@ encoding. The characters `U+0022` (double-quote) (except when followed by at
400400
least as many `U+0023` (`#`) characters as were used to start the raw C string
401401
literal) or `U+005C` (`\`) do not have any special meaning.
402402

403-
> **Edition Differences**: Raw C string literals are accepted in the 2021
403+
> **Edition differences**: Raw C string literals are accepted in the 2021
404404
> edition or later. In earlier additions the token `cr""` is lexed as `cr ""`,
405405
> and `cr#""#` is lexed as `cr #""#` (which is non-grammatical).
406406
@@ -735,7 +735,7 @@ Note that raw identifiers, raw string literals, and raw byte string literals may
735735

736736
Similarly the `r`, `b`, `br`, `c`, and `cr` prefixes used in raw string literals, byte literals, byte string literals, raw byte string literals, C string literals, and raw C string literals are not interpreted as reserved prefixes.
737737

738-
> **Edition Differences**: Starting with the 2021 edition, reserved prefixes are reported as an error by the lexer (in particular, they cannot be passed to macros).
738+
> **Edition differences**: Starting with the 2021 edition, reserved prefixes are reported as an error by the lexer (in particular, they cannot be passed to macros).
739739
>
740740
> Before the 2021 edition, reserved prefixes are accepted by the lexer and interpreted as multiple tokens (for example, one token for the identifier or keyword, followed by a `#` token).
741741
>

src/types/trait-object.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ For example, given a trait `Trait`, the following are all trait objects:
3131
* `dyn 'static + Trait`.
3232
* `dyn (Trait)`
3333

34-
> **Edition Differences**: Before the 2021 edition, the `dyn` keyword may be
34+
> **Edition differences**: Before the 2021 edition, the `dyn` keyword may be
3535
> omitted.
3636
>
3737
> Note: For clarity, it is recommended to always use the `dyn` keyword on your
3838
> trait objects unless your codebase supports compiling with Rust 1.26 or lower.
3939
40-
> **Edition Differences**: In the 2015 edition, if the first bound of the
40+
> **Edition differences**: In the 2015 edition, if the first bound of the
4141
> trait object is a path that starts with `::`, then the `dyn` will be treated
4242
> as a part of the path. The first path can be put in parenthesis to get
4343
> around this. As such, if you want a trait object with the trait

src/visibility-and-privacy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ follows:
156156
- `pub(self)` makes an item visible to the current module. This is equivalent
157157
to `pub(in self)` or not using `pub` at all.
158158

159-
> **Edition Differences**: Starting with the 2018 edition, paths for
159+
> **Edition differences**: Starting with the 2018 edition, paths for
160160
> `pub(in path)` must start with `crate`, `self`, or `super`. The 2015 edition
161161
> may also use paths starting with `::` or modules from the crate root.
162162

0 commit comments

Comments
 (0)