File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 98
98
- [ Generics and substitutions] ( ./generics.md )
99
99
- [ ` TypeFolder ` and ` TypeFoldable ` ] ( ./ty-fold.md )
100
100
- [ Generic arguments] ( ./generic_arguments.md )
101
+ - [ Constants in the type system] ( ./constants.md )
101
102
- [ Type inference] ( ./type-inference.md )
102
103
- [ Trait solving] ( ./traits/resolution.md )
103
104
- [ Early and Late Bound Parameters] ( ./early-late-bound.md )
Original file line number Diff line number Diff line change @@ -7,20 +7,20 @@ with the two *additional* variants being `ConstKind::Value` and `ConstKind::Unev
7
7
8
8
## Unevaluated constants
9
9
10
- * This section talks about what's happening with ` feature(const_generics ) ` enabled.
10
+ * This section talks about what's happening with ` feature(generic_const_exprs ) ` enabled.
11
11
On stable we do not yet supply any generic parameters to anonymous constants,
12
12
avoiding most of the issues mentioned here.*
13
13
14
14
Unless a constant is either a simple literal, e.g. ` [u8; 3] ` or ` foo::<{ 'c' }>() ` ,
15
15
or a generic parameter, e.g. ` [u8; N] ` , converting a constant to its [ ` ty::Const ` ] representation
16
- returns an unevaluated constant. Even fully concrete constants which do not depend on a
17
- generic parameter are not evaluated right away.
16
+ returns an unevaluated constant. Even fully concrete constants which do not depend on
17
+ generic parameters are not evaluated right away.
18
18
19
19
We do not eagerly evaluate constant as they can be used in the ` where ` -clauses of their
20
20
parent item, for example:
21
21
22
22
``` rust
23
- #[feature(const_generics, const_evaluatable_checked )]
23
+ #[feature(generic_const_exprs )]
24
24
fn foo <T : Trait >()
25
25
where
26
26
[u8 ; <T as Trait >:: ASSOC + 1 ]: SomeOtherTrait ,
You can’t perform that action at this time.
0 commit comments