Skip to content

Commit 6a2f7d2

Browse files
committed
Add glossary entries for Day 1
These Rust-specific entries are for concepts taught on Day 1 and could thus be useful to have in the glossary.
1 parent a54794e commit 6a2f7d2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/glossary.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ h1#glossary ~ ul > li:first-line {
3333
- argument:\
3434
Information that is passed into a [function](control-flow-basics/functions.md)
3535
or method.
36+
- array:\
37+
A fixed-size collection of elements of the same type, stored contiguously in
38+
memory. See [Arrays](tuples-and-arrays/arrays.md).
3639
- associated type:\
3740
A type associated with a specific trait. Useful for defining the relationship
3841
between types.
@@ -157,6 +160,10 @@ h1#glossary ~ ul > li:first-line {
157160
- receiver:\
158161
The first parameter in a Rust [method](methods-and-traits/methods.md) that
159162
represents the instance on which the method is called.
163+
- reference:\
164+
A non-owning pointer to a value that borrows it without transferring
165+
ownership. References can be [shared (immutable)](references/shared.md) or
166+
[exclusive (mutable)](references/exclusive.md).
160167
- reference counting:\
161168
A memory management technique in which the number of references to an object
162169
is tracked, and the object is deallocated when the count reaches zero. See
@@ -176,6 +183,10 @@ h1#glossary ~ ul > li:first-line {
176183
- safe:\
177184
Refers to code that adheres to Rust's ownership and borrowing rules,
178185
preventing memory-related errors. See [Unsafe Rust](unsafe-rust.md).
186+
- slice:\
187+
A dynamically-sized view into a contiguous sequence, such as an array or
188+
vector. Unlike arrays, slices have a size determined at runtime. See
189+
[Slices](references/slices.md).
179190
- scope:\
180191
The region of a program where a variable is valid and can be used. See
181192
[Blocks and Scopes](control-flow-basics/blocks-and-scopes.md).

0 commit comments

Comments
 (0)