Skip to content

Commit 039b0f2

Browse files
Remove numbers from requirements
1 parent 89b55a3 commit 039b0f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

promotion.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ arithmetic.
1212

1313
## Rules
1414

15-
### 1. Panics
15+
### Panics
1616

1717
Promotion is not allowed to throw away side effects. This includes panicking.
1818
Let us look at what happens when we promote `&(0_usize - 1)` in a debug build:
@@ -46,7 +46,7 @@ earlier version of miri used to panic on arithmetic overflow even in release
4646
mode. This breaks promotion, because now promoting code that would work (and
4747
could not panic!) at run-time leads to a compile-time CTFE error.
4848

49-
### 2. Const safety
49+
### Const safety
5050

5151
We have explained what happens when evaluating a promoted panics, but what about
5252
other kinds of failure -- what about hitting an unsupported operation or
@@ -89,13 +89,13 @@ but to abort compilation of a program that would have compiled fine if we would
8989
not have decided to promote. It is the responsibility of `foo` to not fail this
9090
way when working with const-safe arguments.
9191

92-
### 3. Constraints on constants
92+
### Constraints on constants
9393

9494
All the [extra restrictions for constants](const.md) beyond const safety also
9595
apply to promoteds, for the same reason: Evaluating the expression at
9696
compile-time instead of run-time should not alter program behavior.
9797

98-
### 4. Drop
98+
### Drop
9999

100100
Expressions containing "needs drop" types
101101
can never be promoted. If such an expression were promoted, the `Drop` impl would

0 commit comments

Comments
 (0)