Skip to content

Commit d24f68e

Browse files
committed
Expand docs a little bit
1 parent 7ee841d commit d24f68e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clippy_lints/src/missing_const_for_fn.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ use syntax_pos::Span;
1111

1212
/// **What it does:**
1313
///
14-
/// Suggests the use of `const` in functions and methods where possible
14+
/// Suggests the use of `const` in functions and methods where possible.
1515
///
1616
/// **Why is this bad?**
17+
///
1718
/// Not using `const` is a missed optimization. Instead of having the function execute at runtime,
18-
/// 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.
1921
///
2022
/// **Known problems:**
2123
///

0 commit comments

Comments
 (0)