@@ -30,7 +30,7 @@ const DEFAULT_DOC_VALID_IDENTS: &[&str] = &[
3030 "MinGW" ,
3131 "CamelCase" ,
3232] ;
33- const DEFAULT_BLACKLISTED_NAMES : & [ & str ] = & [ "foo" , "baz" , "quux" ] ;
33+ const DEFAULT_DISALLOWED_NAMES : & [ & str ] = & [ "foo" , "baz" , "quux" ] ;
3434
3535/// Holds information used by `MISSING_ENFORCED_IMPORT_RENAMES` lint.
3636#[ derive( Clone , Debug , Deserialize ) ]
@@ -159,7 +159,7 @@ macro_rules! define_Conf {
159159 "duplicate field `" , stringify!( $new_conf) ,
160160 "` (provided as `" , stringify!( $name) , "`)"
161161 ) ) ) ,
162- None => $new_conf = Some ( value ) ,
162+ None => $new_conf = $name . clone ( ) ,
163163 } ) ?
164164 } ,
165165 }
@@ -217,12 +217,11 @@ define_Conf! {
217217 ///
218218 /// The minimum rust version that the project supports
219219 ( msrv: Option <String > = None ) ,
220- /// Lint : BLACKLISTED_NAME.
220+ /// DEPRECATED LINT : BLACKLISTED_NAME.
221221 ///
222- /// The list of blacklisted names to lint about. NB: `bar` is not here since it has legitimate uses. The value
223- /// `".."` can be used as part of the list to indicate, that the configured values should be appended to the
224- /// default configuration of Clippy. By default any configuraction will replace the default value.
225- ( blacklisted_names: Vec <String > = super :: DEFAULT_BLACKLISTED_NAMES . iter( ) . map( ToString :: to_string) . collect( ) ) ,
222+ /// Use the Disallowed Names lint instead
223+ #[ conf_deprecated( "Please use `disallowed-names` instead" , disallowed_names) ]
224+ ( blacklisted_names: Vec <String > = Vec :: new( ) ) ,
226225 /// Lint: COGNITIVE_COMPLEXITY.
227226 ///
228227 /// The maximum cognitive complexity a function can have
@@ -232,6 +231,12 @@ define_Conf! {
232231 /// Use the Cognitive Complexity lint instead.
233232 #[ conf_deprecated( "Please use `cognitive-complexity-threshold` instead" , cognitive_complexity_threshold) ]
234233 ( cyclomatic_complexity_threshold: u64 = 25 ) ,
234+ /// Lint: DISALLOWED_NAME.
235+ ///
236+ /// The list of disallowed names to lint about. NB: `bar` is not here since it has legitimate uses. The value
237+ /// `".."` can be used as part of the list to indicate, that the configured values should be appended to the
238+ /// default configuration of Clippy. By default any configuration will replace the default value.
239+ ( disallowed_names: Vec <String > = super :: DEFAULT_DISALLOWED_NAMES . iter( ) . map( ToString :: to_string) . collect( ) ) ,
235240 /// Lint: DOC_MARKDOWN.
236241 ///
237242 /// The list of words this lint should not consider as identifiers needing ticks. The value
@@ -434,7 +439,7 @@ pub fn read(path: &Path) -> TryConf {
434439 match toml:: from_str :: < TryConf > ( & content) {
435440 Ok ( mut conf) => {
436441 extend_vec_if_indicator_present ( & mut conf. conf . doc_valid_idents , DEFAULT_DOC_VALID_IDENTS ) ;
437- extend_vec_if_indicator_present ( & mut conf. conf . blacklisted_names , DEFAULT_BLACKLISTED_NAMES ) ;
442+ extend_vec_if_indicator_present ( & mut conf. conf . disallowed_names , DEFAULT_DISALLOWED_NAMES ) ;
438443
439444 conf
440445 } ,
0 commit comments