Skip to content

Commit

Permalink
Merge pull request #1335 from thepowersgang/fix-const-unsafe-fn-order
Browse files Browse the repository at this point in the history
Edit #911 - The order `const unsafe fn` was chosen (rust-lang/rust#29107)
  • Loading branch information
nikomatsakis committed Oct 26, 2015
2 parents 4f7dfb0 + 5f69ff5 commit 7108a93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions text/0911-const-fn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down Expand Up @@ -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`

0 comments on commit 7108a93

Please sign in to comment.