File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -14,18 +14,23 @@ use rustc_span::def_id::LocalDefId;
1414
1515declare_clippy_lint ! {
1616 /// ### What it does
17- /// Checks for methods with high cognitive complexity .
17+ /// We used to think it measured how hard a method is to understand .
1818 ///
1919 /// ### Why is this bad?
20- /// Methods of high cognitive complexity tend to be hard to
21- /// both read and maintain. Also LLVM will tend to optimize small methods better.
20+ /// Ideally, we would like to be able to measure how hard a function is
21+ /// to understand given its context (what we call its Cognitive Complexity).
22+ /// But that's not what this lint does. See "Known problems"
2223 ///
2324 /// ### Known problems
24- /// Sometimes it's hard to find a way to reduce the
25- /// complexity.
25+ /// The true Cognitive Complexity of a method is not something we can
26+ /// calculate using modern technology. This lint has been left in the
27+ /// `nursery` so as to not mislead users into using this lint as a
28+ /// measurement tool.
29+ ///
30+ /// For more detailed information, see [rust-clippy#3793](https://github.com/rust-lang/rust-clippy/issues/3793)
2631 ///
2732 /// ### Example
28- /// You'll see it when you get the warning.
33+ /// -
2934 #[ clippy:: version = "1.35.0" ]
3035 pub COGNITIVE_COMPLEXITY ,
3136 nursery,
You can’t perform that action at this time.
0 commit comments