From: Ralf Jung Date: Thu, 19 Jul 2018 18:41:06 +0000 (+0200) Subject: clarify conflusion X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/61d4abe5dbb1bc4d3c156995d0f546354029fe9e?ds=inline;hp=5b59a8a70a9ef91f094c88c94becb0bfa00e6857 clarify conflusion --- diff --git a/personal/_posts/2018-07-19-const.md b/personal/_posts/2018-07-19-const.md index d93a6cd..f511b9f 100644 --- a/personal/_posts/2018-07-19-const.md +++ b/personal/_posts/2018-07-19-const.md @@ -228,6 +228,8 @@ I am not sure which effect that should or will have for promotion. ## Conclusion I have discussed the notions of CTFE determinism and CTFE correctness (which are properties of a CTFE engine like miri), as well as const safety (property of a piece of code) and const soundness (property of a type system). +In particular, I propose that *when type-checking safe code in const context, we guarantee that this code is const-safe*, i.e., that it will not hit a CTFE error (though panics are allowed, just like they are in "run-time" Rust code). + There are still plenty of open questions, in particular around the interaction of [`const fn` and traits](https://github.com/rust-lang/rust/issues/24111#issuecomment-311029471), but I hope this terminology is useful when having those discussions. Let the type systems guide us :)