minor fixes

This commit is contained in:
mark 2019-08-24 21:57:17 -05:00 committed by Who? Me?!
parent 3f0eadeff2
commit 3c0ddd7bf9
1 changed files with 5 additions and 2 deletions

View File

@ -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