Skip to content

Commit 8107908

Browse files
committed
add const fn unresolved question
1 parent 3855520 commit 8107908

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

text/0000-compile-time-asserts.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,13 @@ On the other hand, this alternative does not change the behavior of existing cod
103103

104104
# Unresolved questions
105105

106-
How to implement this?
106+
## How to implement this?
107+
108+
## Const-eval the body of `const fn` that are never used in a constant environment
109+
110+
Currently a `const fn` that is called in non-const code is treated just like a normal function.
111+
112+
In case there is a statically known erroneous situation in the body of the function,
113+
the compiler should raise an error, even if the function is never called.
114+
115+
The same applies to unused associated constants.

0 commit comments

Comments
 (0)