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 @@ -20,7 +20,7 @@ That's why we have to be very conservative with what can and cannot be promoted.
2020
2121## Rules
2222
23- ### 1. Panics
23+ ### Panics
2424
2525Promotion is not allowed to throw away side effects. This includes panicking.
2626Let us look at what happens when we promote ` &(0_usize - 1) ` in a debug build:
@@ -56,7 +56,7 @@ could not panic!) at run-time leads to a compile-time CTFE error.
5656* Dynamic check.* The Miri engine already dynamically detects panics, but the
5757main point of promoteds is ruling them out statically.
5858
59- ### 2. Const safety
59+ ### Const safety
6060
6161We have explained what happens when evaluating a promoted panics, but what about
6262other kinds of failure -- what about hitting an unsupported operation or
@@ -105,7 +105,7 @@ For this reason, only `const fn` that were explicitly marked with the
105105* Dynamic check.* The Miri engine already dynamically detects const safety
106106violations, but the main point of promoteds is ruling them out statically.
107107
108- ### 3. Drop
108+ ### Drop
109109
110110Expressions returning "needs drop" types can never be promoted. If such an
111111expression were promoted, the ` Drop ` impl would never get called on the value,
You can’t perform that action at this time.
0 commit comments