Skip to content

Commit db54fa9

Browse files
committed
Clarify which constant expression are still disallowed.
1 parent 734ab29 commit db54fa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/1440-drop-types-in-const.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ runtime-initialisation for global variables.
2626
- (Optionally adding a lint that warn about the possibility of resource leak)
2727
- Alloc instantiating structures with destructors in constant expressions,
2828
- Allow `const fn` to return types with destructors.
29-
- Disallow constant expressions resulting in destructors being called at runtime (i.e: a `drop(foo)` in a `const fn`).
29+
- Disallow constant expressions that require destructors to run during compile-time constant evaluation (i.e: a `drop(foo)` in a `const fn`).
3030

3131
## Examples
3232
Assuming that `RwLock` and `Vec` have `const fn new` methods, the following example is possible and avoids runtime validity checks.

0 commit comments

Comments
 (0)