Why explicit 'const fn' token needed?

From unstable-book:

The const_fn feature allows marking free functions and inherent methods as const , enabling them to be called in constants contexts, with constant arguments.

What is real need to explicitly and verbousely mark this functions with 'const' keyword?
Is there drawbacks if Rust mark all functions called in constant context as 'const fn' automatically and internally.

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

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.