@@ -26,14 +26,6 @@ declare_clippy_lint! {
26
26
/// implemented in the code. Sometimes this will be referred to as
27
27
/// "bikeshedding".
28
28
///
29
- /// Keep in mind, that ordering source code alphabetically can lead to
30
- /// reduced performance in cases where the most commonly used enum variant
31
- /// isn't the first entry anymore, and similar optimizations that can reduce
32
- /// branch misses, cache locality and such. Either don't use this lint if
33
- /// that's relevant, or disable the lint in modules or items specifically
34
- /// where it matters. Other solutions can be to use profile guided
35
- /// optimization (PGO), or other advanced optimization methods.
36
- ///
37
29
/// ### Default Ordering and Configuration
38
30
///
39
31
/// As there is no generally applicable rule, and each project may have
@@ -68,7 +60,19 @@ declare_clippy_lint! {
68
60
/// All item kinds must be accounted for to create an enforceable linting
69
61
/// rule set.
70
62
///
71
- /// ### Known Issues and Limitations
63
+ /// ### Known Problems
64
+ ///
65
+ /// #### Performance Impact
66
+ ///
67
+ /// Keep in mind, that ordering source code alphabetically can lead to
68
+ /// reduced performance in cases where the most commonly used enum variant
69
+ /// isn't the first entry anymore, and similar optimizations that can reduce
70
+ /// branch misses, cache locality and such. Either don't use this lint if
71
+ /// that's relevant, or disable the lint in modules or items specifically
72
+ /// where it matters. Other solutions can be to use profile guided
73
+ /// optimization (PGO), post-link optimization (e.g. using BOLT for LLVM),
74
+ /// or other advanced optimization methods. A good starting point to dig
75
+ /// into optimization is [cargo-pgo].
72
76
///
73
77
/// #### Lints on a Contains basis
74
78
///
@@ -119,6 +123,8 @@ declare_clippy_lint! {
119
123
/// }
120
124
/// ```
121
125
///
126
+ /// [cargo-pgo]: https://github.com/Kobzol/cargo-pgo/blob/main/README.md
127
+ ///
122
128
#[ clippy:: version = "1.81.0" ]
123
129
pub ARBITRARY_SOURCE_ITEM_ORDERING ,
124
130
restriction,
0 commit comments