rust-lang / const-eval

home for proposals in and around compile-time function evaluation
Apache License 2.0
105 stars 17 forks source link

update promotion docs #67

Closed RalfJung closed 3 years ago

RalfJung commented 3 years ago

"Explicit promotion" is no more :tada: , so update the docs accordingly.

Blocked on https://github.com/rust-lang/rust/pull/85110.

Fixes https://github.com/rust-lang/const-eval/issues/35 Fixes https://github.com/rust-lang/const-eval/issues/32

Fixes https://github.com/rust-lang/const-eval/issues/53

RalfJung commented 3 years ago

I marked this as also closing https://github.com/rust-lang/const-eval/issues/53. As far as I know, the only remaining "weirdness" of promotion is that const fn calls get promoted in const/static bodies, and this behavior is discussed at https://github.com/rust-lang/rust/issues/80619. It makes the entire system a bit less clean than I would like, but it also makes it more convenient for users, so maybe that's an okay trade-off. https://github.com/rust-lang/rust/pull/85112 ensures that rustc behaves correctly here.

RalfJung commented 3 years ago

https://github.com/rust-lang/rust/pull/85110 landed. :)