|
1 | 1 | use crate::ClippyConfiguration;
|
2 | 2 | use crate::msrvs::Msrv;
|
3 | 3 | use crate::types::{
|
4 |
| - DisallowedPath, MacroMatcher, MatchLintBehaviour, PubUnderscoreFieldsBehaviour, Rename, SourceItemOrderingCategory, |
5 |
| - SourceItemOrderingEnableFor, SourceItemOrderingModuleItemGroupings, SourceItemOrderingModuleItemKind, |
| 4 | + DisallowedPath, MacroMatcher, MatchLintBehaviour, PubUnderscoreFieldsBehaviour, Rename, SourceItemOrdering, |
| 5 | + SourceItemOrderingCategory, SourceItemOrderingModuleItemGroupings, SourceItemOrderingModuleItemKind, |
6 | 6 | SourceItemOrderingTraitAssocItemKind, SourceItemOrderingTraitAssocItemKinds,
|
7 | 7 | };
|
8 | 8 | use rustc_errors::Applicability;
|
@@ -71,7 +71,7 @@ const DEFAULT_TRAIT_ASSOC_ITEM_KINDS_ORDER: &[SourceItemOrderingTraitAssocItemKi
|
71 | 71 | use SourceItemOrderingTraitAssocItemKind::*;
|
72 | 72 | &[Const, Type, Fn]
|
73 | 73 | };
|
74 |
| -const DEFAULT_ENABLE_SOURCE_ITEM_ORDERING_FOR: &[SourceItemOrderingCategory] = { |
| 74 | +const DEFAULT_SOURCE_ITEM_ORDERING: &[SourceItemOrderingCategory] = { |
75 | 75 | #[allow(clippy::enum_glob_use)] // Very local glob use for legibility.
|
76 | 76 | use SourceItemOrderingCategory::*;
|
77 | 77 | &[Enum, Impl, Module, Struct, Trait]
|
@@ -489,9 +489,6 @@ define_Conf! {
|
489 | 489 | /// Whether to apply the raw pointer heuristic to determine if a type is `Send`.
|
490 | 490 | #[lints(non_send_fields_in_send_ty)]
|
491 | 491 | enable_raw_pointer_heuristic_for_send: bool = true,
|
492 |
| - /// Which kind of elements should be ordered internally, possible values being `enum`, `impl`, `module`, `struct`, `trait`. |
493 |
| - #[lints(arbitrary_source_item_ordering)] |
494 |
| - enable_source_item_ordering_for: SourceItemOrderingEnableFor = DEFAULT_ENABLE_SOURCE_ITEM_ORDERING_FOR.into(), |
495 | 492 | /// Whether to recommend using implicit into iter for reborrowed values.
|
496 | 493 | ///
|
497 | 494 | /// #### Example
|
@@ -644,6 +641,9 @@ define_Conf! {
|
644 | 641 | /// The maximum number of single char bindings a scope may have
|
645 | 642 | #[lints(many_single_char_names)]
|
646 | 643 | single_char_binding_names_threshold: u64 = 4,
|
| 644 | + /// Which kind of elements should be ordered internally, possible values being `enum`, `impl`, `module`, `struct`, `trait`. |
| 645 | + #[lints(arbitrary_source_item_ordering)] |
| 646 | + source_item_ordering: SourceItemOrdering = DEFAULT_SOURCE_ITEM_ORDERING.into(), |
647 | 647 | /// The maximum allowed stack size for functions in bytes
|
648 | 648 | #[lints(large_stack_frames)]
|
649 | 649 | stack_size_threshold: u64 = 512_000,
|
|
0 commit comments