Skip to content

Commit 398ef3e

Browse files
ohadravidCentril
andcommitted
Update glossary and implementations
Co-Authored-By: Mazdak Farrokhzad <[email protected]>
1 parent 66cc1bd commit 398ef3e

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/glossary.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ items are defined in [implementations] and declared in [traits]. Only
3030
functions, constants, and type aliases can be associated. Contrast to a [free
3131
item].
3232

33-
### Blanket Implementation
33+
### Blanket implementation
3434

3535
Any implementation where a type appears [uncovered](#uncovered-type). `impl<T> Foo
3636
for T`, `impl<T> Bar<T> for T`, `impl<T> Bar<Vec<T>> for T`, and `impl<T> Bar<T>
3737
for Vec<T>` are considered blanket impls. However, `impl<T> Bar<Vec<T>> for
38-
Vec<T>` is not a blanket impl, as all instances of `T` which appear in this impl
38+
Vec<T>` is not a blanket impl, as all instances of `T` which appear in this `impl`
3939
are covered by `Vec`.
4040

4141
### Bound
@@ -73,12 +73,12 @@ For example, `2 + (3 * 4)` is an expression that returns the value 14.
7373
An [item] that is not a member of an [implementation], such as a *free
7474
function* or a *free const*. Contrast to an [associated item].
7575

76-
### Fundamental Type
76+
### Fundamental type
7777

7878
Includes `&`, `&mut`, `Box` and `Pin`. Any time a type `T` is
79-
considered [local](#local-type), `&T`, `&mut T`, `Box<T>` and `Pin<T>` are also considered local.
79+
considered [local](#local-type), `&T`, `&mut T`, `Box<T>`, and `Pin<T>` are also considered local.
8080
Fundamental types cannot [cover](#uncovered-type) other types. Any time the term "covered type" is
81-
used, the `T` in `&T`, `&mut T`, `Box<T>` and `Pin<T>` is not considered covered.
81+
used, the `T` in `&T`, `&mut T`, `Box<T>`, and `Pin<T>` is not considered covered.
8282

8383
### Inhabited
8484

@@ -102,18 +102,18 @@ A variable is initialized if it has been assigned a value and hasn't since been
102102
moved from. All other memory locations are assumed to be uninitialized. Only
103103
unsafe Rust can create such a memory without initializing it.
104104

105-
### Local Trait
105+
### Local trait
106106

107-
A trait which was defined in the current crate. Whether a trait is
108-
local or not has nothing to do with type parameters. Given `trait Foo<T, U>`,
109-
`Foo` is always local, regardless of the types used for `T` or `U`.
107+
A `trait` which was defined in the current crate. A trait definition is local
108+
or not independent of applied type arguments. Given `trait Foo<T, U>`,
109+
`Foo` is always local, regardless of the types substituted for `T` and `U`.
110110

111-
### Local Type
111+
### Local type
112112

113-
A struct, enum, or union which was defined in the current crate.
114-
This is not affected by type parameters. `struct Foo` is considered local, but
115-
`Vec<Foo>` is not. `LocalType<ForeignType>` is local. Type aliases and trait
116-
aliases do not affect locality.
113+
A `struct`, `enum`, or `union` which was defined in the current crate.
114+
This is not affected by applied type arguments. `struct Foo` is considered local, but
115+
`Vec<Foo>` is not. `LocalType<ForeignType>` is local. Type aliases do not
116+
affect locality.
117117

118118
### Nominal types
119119

@@ -186,11 +186,11 @@ It allows a type to make certain promises about its behavior.
186186

187187
Generic functions and generic structs can use traits to constrain, or bound, the types they accept.
188188

189-
### Uncovered Type
189+
### Uncovered type
190190

191-
A type which does not appear as a parameter to another type. For example,
191+
A type which does not appear as an argument to another type. For example,
192192
`T` is uncovered, but the `T` in `Vec<T>` is covered. This is only relevant for
193-
type parameters.
193+
type arguments.
194194

195195
### Undefined behavior
196196

src/items/implementations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ be instantiable with the same set of types for the input type parameters. -->
162162

163163
#### Orphan rules
164164

165-
Given `impl<P1..=Pn> Trait<T1..=Tn> for T0`, an impl is valid only if at
165+
Given `impl<P1..=Pn> Trait<T1..=Tn> for T0`, an `impl` is valid only if at
166166
least one of the following is true:
167167

168168
- `Trait` is a [local trait]
@@ -172,8 +172,8 @@ least one of the following is true:
172172
- No [uncovered type] parameters `P1..=Pn` may appear in `T0..Ti` (excluding
173173
`Ti`)
174174

175-
We only restrict the appearance of *uncovered* type parameters. Once again, it is
176-
important to note that for the purposes of coherence, [fundamental types] are
175+
Only the appearance of *uncovered* type parameters is restricted.
176+
Note that for the purposes of coherence, [fundamental types] are
177177
special. The `T` in `Box<T>` is not considered covered, and `Box<LocalType>`
178178
is considered local.
179179

@@ -229,4 +229,4 @@ attributes].
229229
[local trait]: ../glossary.md#local-trait
230230
[local type]: ../glossary.md#local-type
231231
[fundamental types]: ../glossary.md#fundamental-type
232-
[uncovered type]: ../glossary.md#uncovered-type
232+
[uncovered type]: ../glossary.md#uncovered-type

0 commit comments

Comments
 (0)