1
1
use crate :: ClippyConfiguration ;
2
2
use crate :: types:: {
3
- DisallowedPath , InitializerSuggestionApplicability , MacroMatcher , MatchLintBehaviour , PubUnderscoreFieldsBehaviour ,
4
- Rename , SourceItemOrdering , SourceItemOrderingCategory , SourceItemOrderingModuleItemGroupings ,
5
- SourceItemOrderingModuleItemKind , SourceItemOrderingTraitAssocItemKind , SourceItemOrderingTraitAssocItemKinds ,
3
+ DisallowedPath , MacroMatcher , MatchLintBehaviour , PubUnderscoreFieldsBehaviour , Rename , SourceItemOrdering ,
4
+ SourceItemOrderingCategory , SourceItemOrderingModuleItemGroupings , SourceItemOrderingModuleItemKind ,
5
+ SourceItemOrderingTraitAssocItemKind , SourceItemOrderingTraitAssocItemKinds ,
6
6
} ;
7
7
use clippy_utils:: msrvs:: Msrv ;
8
8
use rustc_errors:: Applicability ;
@@ -526,14 +526,10 @@ define_Conf! {
526
526
/// A list of paths to types that should be treated as if they do not contain interior mutability
527
527
#[ lints( borrow_interior_mutable_const, declare_interior_mutable_const, ifs_same_cond, mutable_key_type) ]
528
528
ignore_interior_mutability: Vec <String > = Vec :: from( [ "bytes::Bytes" . into( ) ] ) ,
529
- /// Suggestion behavior when initializers are present. Options are:
529
+ /// Whether to suggest reordering constructor fields when initializers are present.
530
530
///
531
- /// - "none": do not suggest
532
- /// - "maybe-incorrect": suggest, but do not apply suggestions with `--fix`
533
- /// - "machine-applicable": suggest and apply suggestions with `--fix`
534
- ///
535
- /// The following example [due to @ronnodas] shows why "maybe-incorrect" may be the right choice.
536
- /// Swapping the fields in the constructor produces incompilable code:
531
+ /// Note that such suggestions are not applied automatically with `--fix`. The following example
532
+ /// [due to @ronnodas] shows why. Swapping the fields in the constructor produces incompilable code:
537
533
///
538
534
/// ```rust
539
535
/// struct MyStruct {
@@ -548,7 +544,7 @@ define_Conf! {
548
544
///
549
545
/// [due to @ronnodas]: https://github.com/rust-lang/rust-clippy/issues/11846#issuecomment-1820747924
550
546
#[ lints( inconsistent_struct_constructor) ]
551
- initializer_suggestions: InitializerSuggestionApplicability = InitializerSuggestionApplicability :: None ,
547
+ initializer_suggestions: bool = false ,
552
548
/// The maximum size of the `Err`-variant in a `Result` returned from a function
553
549
#[ lints( result_large_err) ]
554
550
large_error_threshold: u64 = 128 ,
0 commit comments