Why explicit 'const fn' token needed?

Placing a const declaration on a function is a promise made by the implementor that they won’t change the function in a non-const-compatible way. This is a common theme in Rust’s design: To reduce breakage as code evolves, you’re only allowed to rely on features that have been intentionally declared by the author.

11 Likes