Skip to content

Commit 82d4c56

Browse files
lcnrjyn514
authored andcommitted
const generics update
1 parent 1795756 commit 82d4c56

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
- [Generics and substitutions](./generics.md)
9999
- [`TypeFolder` and `TypeFoldable`](./ty-fold.md)
100100
- [Generic arguments](./generic_arguments.md)
101+
- [Constants in the type system](./constants.md)
101102
- [Type inference](./type-inference.md)
102103
- [Trait solving](./traits/resolution.md)
103104
- [Early and Late Bound Parameters](./early-late-bound.md)

src/constants.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ with the two *additional* variants being `ConstKind::Value` and `ConstKind::Unev
77

88
## Unevaluated constants
99

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.
1111
On stable we do not yet supply any generic parameters to anonymous constants,
1212
avoiding most of the issues mentioned here.*
1313

1414
Unless a constant is either a simple literal, e.g. `[u8; 3]` or `foo::<{ 'c' }>()`,
1515
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.
1818

1919
We do not eagerly evaluate constant as they can be used in the `where`-clauses of their
2020
parent item, for example:
2121

2222
```rust
23-
#[feature(const_generics, const_evaluatable_checked)]
23+
#[feature(generic_const_exprs)]
2424
fn foo<T: Trait>()
2525
where
2626
[u8; <T as Trait>::ASSOC + 1]: SomeOtherTrait,

0 commit comments

Comments
 (0)