@@ -30,7 +30,7 @@ const DEFAULT_DOC_VALID_IDENTS: &[&str] = &[
30
30
"MinGW" ,
31
31
"CamelCase" ,
32
32
] ;
33
- const DEFAULT_BLACKLISTED_NAMES : & [ & str ] = & [ "foo" , "baz" , "quux" ] ;
33
+ const DEFAULT_DISALLOWED_NAMES : & [ & str ] = & [ "foo" , "baz" , "quux" ] ;
34
34
35
35
/// Holds information used by `MISSING_ENFORCED_IMPORT_RENAMES` lint.
36
36
#[ derive( Clone , Debug , Deserialize ) ]
@@ -159,7 +159,7 @@ macro_rules! define_Conf {
159
159
"duplicate field `" , stringify!( $new_conf) ,
160
160
"` (provided as `" , stringify!( $name) , "`)"
161
161
) ) ) ,
162
- None => $new_conf = Some ( value ) ,
162
+ None => $new_conf = $name . clone ( ) ,
163
163
} ) ?
164
164
} ,
165
165
}
@@ -217,12 +217,11 @@ define_Conf! {
217
217
///
218
218
/// The minimum rust version that the project supports
219
219
( msrv: Option <String > = None ) ,
220
- /// Lint : BLACKLISTED_NAME.
220
+ /// DEPRECATED LINT : BLACKLISTED_NAME.
221
221
///
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( ) ) ,
226
225
/// Lint: COGNITIVE_COMPLEXITY.
227
226
///
228
227
/// The maximum cognitive complexity a function can have
@@ -232,6 +231,12 @@ define_Conf! {
232
231
/// Use the Cognitive Complexity lint instead.
233
232
#[ conf_deprecated( "Please use `cognitive-complexity-threshold` instead" , cognitive_complexity_threshold) ]
234
233
( 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( ) ) ,
235
240
/// Lint: DOC_MARKDOWN.
236
241
///
237
242
/// 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 {
434
439
match toml:: from_str :: < TryConf > ( & content) {
435
440
Ok ( mut conf) => {
436
441
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 ) ;
438
443
439
444
conf
440
445
} ,
0 commit comments