Skip to content

Commit 5f69ff5

Browse files
committed
The order const unsafe fn was chosen (rust-lang/rust#29107)
1 parent 4f7dfb0 commit 5f69ff5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/0911-const-fn.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ invariants to be maintained (e.g. `std::ptr::Unique` requires a non-null pointer
178178
struct OptionalInt(u32);
179179
impl OptionalInt {
180180
/// Value must be non-zero
181-
unsafe const fn new(val: u32) -> OptionalInt {
181+
const unsafe fn new(val: u32) -> OptionalInt {
182182
OptionalInt(val)
183183
}
184184
}
@@ -241,4 +241,4 @@ cannot be taken for granted, at least `if`/`else` should eventually work.
241241

242242
Since it was accepted, the RFC has been updated as follows:
243243

244-
1. Allowed `unsafe const fn`
244+
1. Allowed `const unsafe fn`

0 commit comments

Comments
 (0)