File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Some of the collection types do not allocate any memory when constructed empty (
15
15
is no longer required to be a hard error (as it is safe and accepted that these destructors may never run).
16
16
17
17
Allowing types with destructors to be directly used in ` const ` functions and stored in ` static ` s or ` const ` s will remove the need to have
18
- runtime-initialisation for global variables.
18
+ runtime-initialization for global variables.
19
19
20
20
# Detailed design
21
21
[ design ] : #detailed-design
@@ -62,9 +62,9 @@ A `const` item's destructor _will_ run at each point where the `const` item is u
62
62
# Alternatives
63
63
[ alternatives ] : #alternatives
64
64
65
- - Runtime initialisation of a raw pointer can be used instead (as the ` lazy_static ` crate currently does on stable)
65
+ - Runtime initialization of a raw pointer can be used instead (as the ` lazy_static ` crate currently does on stable).
66
66
- On nightly, a bug related to ` static ` and ` UnsafeCell<Option<T>> ` can be used to remove the dynamic allocation.
67
- - Both of these alternatives require runtime initialisation , and incur a checking overhead on subsequent accesses.
67
+ - Both of these alternatives require runtime initialization , and incur a checking overhead on subsequent accesses.
68
68
- Leaking of objects could be addressed by using C++-style ` .dtors ` support
69
69
- This is undesirable, as it introduces confusion around destructor execution order.
70
70
You can’t perform that action at this time.
0 commit comments