From 5f69ff50de1fb6d0dd8c005b4f11f6e436e1f34c Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 24 Oct 2015 16:57:24 +0800 Subject: [PATCH] The order `const unsafe fn` was chosen (rust-lang/rust#29107) --- text/0911-const-fn.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text/0911-const-fn.md b/text/0911-const-fn.md index de4aae48e51..388d6213c14 100644 --- a/text/0911-const-fn.md +++ b/text/0911-const-fn.md @@ -178,7 +178,7 @@ invariants to be maintained (e.g. `std::ptr::Unique` requires a non-null pointer struct OptionalInt(u32); impl OptionalInt { /// Value must be non-zero - unsafe const fn new(val: u32) -> OptionalInt { + const unsafe fn new(val: u32) -> OptionalInt { OptionalInt(val) } } @@ -241,4 +241,4 @@ cannot be taken for granted, at least `if`/`else` should eventually work. Since it was accepted, the RFC has been updated as follows: -1. Allowed `unsafe const fn` +1. Allowed `const unsafe fn`