11use crate :: ClippyConfiguration ;
22use 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 ,
66} ;
77use clippy_utils:: msrvs:: Msrv ;
88use rustc_errors:: Applicability ;
@@ -526,14 +526,10 @@ define_Conf! {
526526 /// A list of paths to types that should be treated as if they do not contain interior mutability
527527 #[ lints( borrow_interior_mutable_const, declare_interior_mutable_const, ifs_same_cond, mutable_key_type) ]
528528 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.
530530 ///
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:
537533 ///
538534 /// ```rust
539535 /// struct MyStruct {
@@ -548,7 +544,7 @@ define_Conf! {
548544 ///
549545 /// [due to @ronnodas]: https://github.com/rust-lang/rust-clippy/issues/11846#issuecomment-1820747924
550546 #[ lints( inconsistent_struct_constructor) ]
551- initializer_suggestions: InitializerSuggestionApplicability = InitializerSuggestionApplicability :: None ,
547+ initializer_suggestions: bool = false ,
552548 /// The maximum size of the `Err`-variant in a `Result` returned from a function
553549 #[ lints( result_large_err) ]
554550 large_error_threshold: u64 = 128 ,
0 commit comments