From e5115873bad6f34c2a9dc1484e60eb49ea72b491 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Sun, 23 Dec 2018 14:23:29 +0100 Subject: [PATCH 1/2] Update functions.md --- src/items/functions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/items/functions.md b/src/items/functions.md index 7712b0196..70bacfce5 100644 --- a/src/items/functions.md +++ b/src/items/functions.md @@ -185,9 +185,9 @@ Exhaustive list of permitted structures in const functions: * Reading from constants (but not statics, not even taking a reference to a static) * `&` and `*` (only dereferencing of references, not raw pointers) * Casts except for raw pointer to integer casts -* `const unsafe fn` is allowed, but the body must consist of safe operations - only and you won't be able to call the `const unsafe fn` from within another - const function even if you use `unsafe` +* `unsafe` blocks and `const unsafe fn` is allowed, but the body/block must consist + of safe operations or calls to other const functions only. Further unsafe operations + may get allowed in const functions in the future. ## Attributes on functions From 9cdf6e82cd01db516fa681873e57a3054c4e3631 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Sun, 23 Dec 2018 15:30:17 +0100 Subject: [PATCH 2/2] Update functions.md --- src/items/functions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/items/functions.md b/src/items/functions.md index 70bacfce5..9a0a682e4 100644 --- a/src/items/functions.md +++ b/src/items/functions.md @@ -185,9 +185,9 @@ Exhaustive list of permitted structures in const functions: * Reading from constants (but not statics, not even taking a reference to a static) * `&` and `*` (only dereferencing of references, not raw pointers) * Casts except for raw pointer to integer casts -* `unsafe` blocks and `const unsafe fn` is allowed, but the body/block must consist - of safe operations or calls to other const functions only. Further unsafe operations - may get allowed in const functions in the future. +* `unsafe` blocks and `const unsafe fn` are allowed, but the body/block may only do + the following unsafe operations: + * calls to const unsafe functions ## Attributes on functions