|
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]
|
@@ -464,9 +464,6 @@ define_Conf! {
|
464 | 464 | /// Whether to apply the raw pointer heuristic to determine if a type is `Send`.
|
465 | 465 | #[lints(non_send_fields_in_send_ty)]
|
466 | 466 | enable_raw_pointer_heuristic_for_send: bool = true,
|
467 |
| - /// Which kind of elements should be ordered internally, possible values being `enum`, `impl`, `module`, `struct`, `trait`. |
468 |
| - #[lints(arbitrary_source_item_ordering)] |
469 |
| - enable_source_item_ordering_for: SourceItemOrderingEnableFor = DEFAULT_ENABLE_SOURCE_ITEM_ORDERING_FOR.into(), |
470 | 467 | /// Whether to recommend using implicit into iter for reborrowed values.
|
471 | 468 | ///
|
472 | 469 | /// #### Example
|
@@ -619,6 +616,9 @@ define_Conf! {
|
619 | 616 | /// The maximum number of single char bindings a scope may have
|
620 | 617 | #[lints(many_single_char_names)]
|
621 | 618 | single_char_binding_names_threshold: u64 = 4,
|
| 619 | + /// Which kind of elements should be ordered internally, possible values being `enum`, `impl`, `module`, `struct`, `trait`. |
| 620 | + #[lints(arbitrary_source_item_ordering)] |
| 621 | + source_item_ordering: SourceItemOrdering = DEFAULT_SOURCE_ITEM_ORDERING.into(), |
622 | 622 | /// The maximum allowed stack size for functions in bytes
|
623 | 623 | #[lints(large_stack_frames)]
|
624 | 624 | stack_size_threshold: u64 = 512_000,
|
|
0 commit comments