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
33049eb
Move items/generics in preparation for generics restructuring
ehuss Sep 30, 2025
6cbfbf4
Update generic rule names after move
ehuss Sep 30, 2025
d94ed46
Update links to generics chapter after move
ehuss Sep 30, 2025
ac7e286
Update generic parameters to fit into the chapter
ehuss Oct 7, 2025
ab799c6
Move where clause to the bounds chapter
ehuss Feb 3, 2026
a8e4928
Move intro to the top
ehuss Feb 3, 2026
a35bdd4
Move generic args to the generics chapter
ehuss Feb 10, 2026
cb7b686
Rewrite the paths in expressions intro
ehuss Feb 10, 2026
22a806b
Add an introduction to the generics chapter
ehuss Feb 10, 2026
a339afe
Rewrite generics.arguments.intro
ehuss Apr 29, 2026
f1c6afe
Add a dedicated section for generic const arguments
ehuss Apr 29, 2026
d0ef939
Move const argument rules into the const arguments section
ehuss Apr 29, 2026
50ab000
Move generics.const.type-ambiguity to the generic const arguments sec…
ehuss Apr 29, 2026
d51cca3
Add "argument ordering and matching"
ehuss Apr 29, 2026
6776a0d
Add a section on inferred generic arguments
ehuss Apr 29, 2026
2be65df
Add "associated item constraints"
ehuss Apr 29, 2026
4ab7e3a
Fix generic attributes rule
ehuss Apr 29, 2026
5c95dd0
Add an example for const generics
ehuss Mar 3, 2026
e8a624a
Move examples into example blocks
ehuss Mar 3, 2026
de92bf1
Document attributes on generic parameters
ehuss Mar 4, 2026
b796d96
Move "Infer arguments" up into the arguments section
ehuss Apr 28, 2026
64993c8
Move generic constants to a dedicated chapter
ehuss Mar 24, 2026
8735602
Add a dedicated chapter for generic lifetimes
ehuss Apr 8, 2026
e304481
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