@@ -97,11 +97,20 @@ macro_rules! define_Conf {
9797 pub ( crate ) fn get_configuration_metadata( ) -> Vec <ClippyConfigurationBasicInfo > {
9898 vec![
9999 $(
100- ClippyConfigurationBasicInfo {
101- name: stringify!( $name) ,
102- config_type: stringify!( $ty) ,
103- default : stringify!( $default) ,
104- doc_comment: $doc,
100+ {
101+ #[ allow( unused_mut, unused_assignments) ]
102+ let mut deprecation_reason = None ;
103+
104+ // only set if a deprecation reason was set
105+ $( deprecation_reason = Some ( stringify!( $dep) ) ; ) ?
106+
107+ ClippyConfigurationBasicInfo {
108+ name: stringify!( $name) ,
109+ config_type: stringify!( $ty) ,
110+ default : stringify!( $default) ,
111+ doc_comment: $doc,
112+ deprecation_reason,
113+ }
105114 } ,
106115 ) +
107116 ]
@@ -118,7 +127,7 @@ define_Conf! {
118127 ( blacklisted_names: Vec <String > = [ "foo" , "baz" , "quux" ] . iter( ) . map( ToString :: to_string) . collect( ) ) ,
119128 /// Lint: COGNITIVE_COMPLEXITY. The maximum cognitive complexity a function can have
120129 ( cognitive_complexity_threshold: u64 = 25 ) ,
121- /// Lint : CYCLOMATIC_COMPLEXITY. Use the Cognitive Complexity lint instead.
130+ /// DEPRECATED LINT : CYCLOMATIC_COMPLEXITY. Use the Cognitive Complexity lint instead.
122131 #[ conf_deprecated( "Please use `cognitive-complexity-threshold` instead" ) ]
123132 ( cyclomatic_complexity_threshold: Option <u64 > = None ) ,
124133 /// Lint: DOC_MARKDOWN. The list of words this lint should not consider as identifiers needing ticks
0 commit comments