Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2c89096
Move items/generics in preparation for generics restructuring
ehuss Sep 30, 2025
0bbe1b8
Update generic rule names after move
ehuss Sep 30, 2025
0f677fd
Update links to generics chapter after move
ehuss Sep 30, 2025
19d404b
Update generic parameters to fit into the chapter
ehuss Oct 7, 2025
9ae521e
Move where clause to the bounds chapter
ehuss Feb 3, 2026
ddb9073
Move intro to the top
ehuss Feb 3, 2026
20784ce
Move generic args to the generics chapter
ehuss Feb 10, 2026
fba95d0
Rewrite the paths in expressions intro
ehuss Feb 10, 2026
4d053a4
Add an introduction to the generics chapter
ehuss Feb 10, 2026
8adecc7
Rewrite generics.arguments.intro
ehuss Apr 29, 2026
5dbca9c
Add a dedicated section for generic const arguments
ehuss Apr 29, 2026
9742a1a
Move const argument rules into the const arguments section
ehuss Apr 29, 2026
263b720
Move generics.const.type-ambiguity to the generic const arguments sec…
ehuss Apr 29, 2026
bcdacaa
Add "argument ordering and matching"
ehuss Apr 29, 2026
e0ba4d9
Add a section on inferred generic arguments
ehuss Apr 29, 2026
06fee18
Add "associated item constraints"
ehuss Apr 29, 2026
5e32d99
Fix generic attributes rule
ehuss Apr 29, 2026
2884afd
Add an example for const generics
ehuss Mar 3, 2026
5a75d50
Move examples into example blocks
ehuss Mar 3, 2026
6b68998
Document attributes on generic parameters
ehuss Mar 4, 2026
b289575
Move "Infer arguments" up into the arguments section
ehuss Apr 28, 2026
eb5f3f5
Move generic constants to a dedicated chapter
ehuss Mar 24, 2026
4cac4e8
Add a dedicated chapter for generic lifetimes
ehuss Apr 8, 2026
c8fbc1e
Add a dedicated chapter for generic types
ehuss Apr 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ use-boolean-and = true
"/expressions/operator-expr.html#the-question-mark-operator" = "operator-expr.html#the-try-propagation-expression"
"/glossary.html#object-safe-traits" = "glossary.html#dyn-compatible-traits"
"/items/extern-crates.html#extern-prelude" = "../names/preludes.html#extern-prelude"
"/items/generics.html" = "../types/generics/index.html"
"/items/generics.html#generic-lifetimes" = "../types/generics/lifetimes.html"
"/items/generics.html#where-clauses" = "../trait-bounds.html#where-clauses"
"/items/modules.html#prelude-items" = "../names/preludes.html"
"/items/traits.html#object-safety" = "traits.html#dyn-compatibility"
"/lifetime-elision.html#static-lifetime-elision" = "lifetime-elision.html#const-and-static-elision"
Expand Down
5 changes: 4 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
- [Traits](items/traits.md)
- [Implementations](items/implementations.md)
- [External blocks](items/external-blocks.md)
- [Generic parameters](items/generics.md)
- [Associated items](items/associated-items.md)

- [Attributes](attributes.md)
Expand Down Expand Up @@ -93,6 +92,10 @@
- [Impl trait type](types/impl-trait.md)
- [Type parameters](types/parameters.md)
- [Inferred type](types/inferred.md)
- [Generics](types/generics/index.md)
- [Generic lifetimes](types/generics/lifetimes.md)
- [Generic types](types/generics/types.md)
- [Generic constants](types/generics/constants.md)
- [Dynamically sized types](dynamically-sized-types.md)
- [Type layout](type-layout.md)
- [Interior mutability](interior-mutability.md)
Expand Down
1 change: 0 additions & 1 deletion src/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ The following is an index of all built-in attributes.
[expression statement]: statements.md#expression-statements
[external blocks]: items/external-blocks.md
[functions]: items/functions.md
[generics]: items/generics.md
[implementations]: items/implementations.md
[item declarations]: items.md
[match expressions]: expressions/match-expr.md
Expand Down
6 changes: 3 additions & 3 deletions src/const_eval.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ The types of a const function's parameters and return type are restricted to tho
[comparison]: expressions/operator-expr.md#comparison-operators
[const block]: expressions/block-expr.md#const-blocks
[const functions]: items/functions.md#const-functions
[const generic argument]: items/generics.md#const-generics
[const generic parameters]: items/generics.md#const-generics
[const generic argument]: generics.const
[const generic parameters]: generics.const
[constant expressions]: #constant-expressions
[constants]: items/constant-items.md
[Const parameters]: items/generics.md
[Const parameters]: generics.const
[dereference expression]: expr.deref
[dereference expressions]: expr.deref
[destructors]: destructors.md
Expand Down
2 changes: 1 addition & 1 deletion src/crates-and-source-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ The crate name must not be empty, and must only contain [Unicode alphanumeric] o
[panic-docs]: panic.md#unwinding-across-ffi-boundaries
[shebang]: shebang.md
[trait or lifetime bounds]: trait-bounds.md
[where clauses]: items/generics.md#where-clauses
[where clauses]: bound.where
4 changes: 2 additions & 2 deletions src/expressions/array-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ The array index expression can be implemented for types other than arrays and sl
[IndexMut]: std::ops::IndexMut
[Index]: std::ops::Index
[array]: ../types/array.md
[const generic argument]: items.generics.const.argument
[const generic argument]: generics.const.arguments
[const block expression]: expr.block.const
[constant expression]: ../const_eval.md#constant-expressions
[constant item]: ../items/constant-items.md
[inferred const]: items.generics.const.inferred
[inferred const]: generics.const.arguments.inferred
[literal]: ../tokens.md#literals
[memory location]: ../expressions.md#place-expressions-and-value-expressions
[panic]: ../panic.md
Expand Down
2 changes: 1 addition & 1 deletion src/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ assert_eq!(0, size_of::<U>());
[fields]: expressions/field-expr.md
[free item]: #free-item
[function items]: type.fn-item
[generic parameters]: items/generics.md
[generic parameters]: generics
[identifier]: identifiers.md
[identifiers]: identifiers.md
[implementation]: items/implementations.md
Expand Down
4 changes: 2 additions & 2 deletions src/items/associated-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,6 @@ fn main() {
[method call operator]: ../expressions/method-call-expr.md
[path]: ../paths.md
[regular function parameters]: functions.md#attributes-on-function-parameters
[generic parameters]: generics.md
[where clauses]: generics.md#where-clauses
[generic parameters]: generics
[where clauses]: bound.where
[constant evaluation]: ../const_eval.md
Loading
Loading