Skip to content

Commit e296b3c

Browse files
committed
Address most of scottmcm's comments.
1 parent a9e0a92 commit e296b3c

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/glossary.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ the structure of the program when the compiler is compiling it.
77

88
### Arity
99

10-
Arity refers to the number of arguments a function or operation takes.
11-
For example, `f(2, 3)` and `g(4, 6)` have arity 2, while `h(8, 2, 6)` has arity 3.
10+
Arity refers to the number of arguments a function or operator takes.
11+
For some examples, `f(2, 3)` and `g(4, 6)` have arity 2, while `h(8, 2, 6)`
12+
has arity 3. The `!` operator has arity 1.
1213

1314
### Array
1415

@@ -19,9 +20,8 @@ at run time by the program. It occupies a contiguous region of memory.
1920
### Associated Item
2021

2122
An associated item is an item that is associated with another item. Associated
22-
items are defined in [implementations] and [traits]. Only functions, constants,
23-
and types can be associated.
24-
23+
items are defined in [implementations] and declared in [traits]. Only functions,
24+
constants, and type aliases can be associated.
2525

2626
### Bound
2727

@@ -61,8 +61,8 @@ can create such an lvalue without initializing it.
6161

6262
### Nominal Types
6363

64-
Types that can be named directly. Specifically [enums], [structs], [unions],
65-
and [trait objects].
64+
Types that can be referred to by a path directly. Specifically [enums],
65+
[structs], [unions], and [trait objects].
6666

6767
### Prelude
6868

@@ -100,9 +100,9 @@ Strings slices are always valid UTF-8.
100100
### Trait
101101

102102
A trait is a language item that is used for describing the functionalities a type must provide.
103-
It allow a type to make certain promises about its behavior.
103+
It allows a type to make certain promises about its behavior.
104104

105-
Generic functions and generic structs can exploit traits to constrain, or bound, the types they accept.
105+
Generic functions and generic structs can use traits to constrain, or bound, the types they accept.
106106

107107
[enums]: items/enumerations.html
108108
[structs]: items/structs.html

src/items/implementations.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Implementations are defined with the keyword `impl`.
1010
## Bare Implementations
1111

1212
A bare implementation is defined as the sequence of the `impl` keyword, generic
13-
type declarations, a path to a nomial tyupe, a where clause, and a bracketed
13+
type declarations, a path to a nomial type, a where clause, and a bracketed
1414
set of associable items.
1515

1616
The nominal type is called the *implementing type* and the associable items are
@@ -21,6 +21,8 @@ Bare implementations associate the associated items to the implementing type.
2121
The associated item has a path of a path to the implementing type followed by
2222
the associate item's path component.
2323

24+
Bare implementations cannot contain associated type aliases.
25+
2426
A type can have multiple bare implementations.
2527

2628
The implementing type must be defined within the same crate.

0 commit comments

Comments
 (0)