You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this to work, const operations have to be deterministic and
4
+
must not depend on any external state,
5
+
at least when they are used in the type system.
6
+
7
+
Using floats during CTFE is fully determinstic. So using
8
+
them inside of the type system is fine. CTFE can however
9
+
produce different results than what would happen on real hardware,
10
+
but this is not a concern for const generics.
11
+
12
+
Other sources of non-determinism are allocations. This non-determinism
13
+
must however not be observed during const-evaluation (TODO: link to const-eval).
14
+
Any references used in a constant are considered equal if their targets are equal, which is also determistic. (ref [val-trees](https://github.com/rust-lang/rust/issues/72396))
0 commit comments