We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ee841d commit d24f68eCopy full SHA for d24f68e
clippy_lints/src/missing_const_for_fn.rs
@@ -11,11 +11,13 @@ use syntax_pos::Span;
11
12
/// **What it does:**
13
///
14
-/// Suggests the use of `const` in functions and methods where possible
+/// Suggests the use of `const` in functions and methods where possible.
15
16
/// **Why is this bad?**
17
+///
18
/// Not using `const` is a missed optimization. Instead of having the function execute at runtime,
-/// when using `const`, it's evaluated at compiletime.
19
+/// when using `const`, it's evaluated at compiletime. The result of the evaluation is inlined
20
+/// during compilation and doesn't have to be recomputed during runtime.
21
22
/// **Known problems:**
23
0 commit comments