From 3c0ddd7bf9240c7875cd2adbf617acfb26167098 Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 24 Aug 2019 21:57:17 -0500 Subject: [PATCH] minor fixes --- src/stability.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/stability.md b/src/stability.md index 5af80932..f35b1c08 100644 --- a/src/stability.md +++ b/src/stability.md @@ -3,7 +3,8 @@ This section is about the stability attributes and schemes that allow stable APIs to use unstable APIs internally in the rustc standard library. -For instructions on stabilizing a language feature see [Stabilizing Features](./stabilization_guide.md). +For instructions on stabilizing a language feature see +[Stabilizing Features](./stabilization_guide.md). # unstable @@ -34,9 +35,11 @@ Note that `const fn`s are even more special in this regard. You can't just white the features need an implementation in `qualify_min_const_fn.rs`. For example the `const_fn_union` feature gate allows accessing fields of unions inside stable `const fn`s. The rules for when it's ok to use such a feature gate are that behavior matches the runtime behavior of the same code -(see also https://www.ralfj.de/blog/2018/07/19/const.html). This means that you may not create a +(see also [this blog post][blog]). This means that you may not create a `const fn` that e.g. transmutes a memory address to an integer, because the addresses of things are nondeterministic and often unknown at compile-time. Always ping @oli-obk, @RalfJung, and @Centril if you are adding more `allow_internal_unstable` attributes to any `const fn` + +[blog]: https://www.ralfj.de/blog/2018/07/19/const.html