fix and rebase
This commit is contained in:
parent
077481053c
commit
aa1ecb6fce
|
@ -85,14 +85,13 @@ impl<'a, 'b, 'c> SimilarNamesNameVisitor<'a, 'b, 'c> {
|
|||
return;
|
||||
}
|
||||
self.0.single_char_names.push(c);
|
||||
if self.0.single_char_names.len() < self.0.lint.max_single_char_names {
|
||||
return;
|
||||
if self.0.single_char_names.len() >= self.0.lint.max_single_char_names {
|
||||
span_lint(self.0.cx,
|
||||
MANY_SINGLE_CHAR_NAMES,
|
||||
span,
|
||||
&format!("{}th binding whose name is just one char",
|
||||
self.0.single_char_names.len()));
|
||||
}
|
||||
span_lint(self.0.cx,
|
||||
MANY_SINGLE_CHAR_NAMES,
|
||||
span,
|
||||
&format!("{}th binding whose name is just one char",
|
||||
self.0.single_char_names.len()));
|
||||
return;
|
||||
}
|
||||
for &allow in WHITELIST {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#![allow(dead_code)]
|
||||
#![allow(single_match)]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(unused_variables, similar_names)]
|
||||
#![deny(blacklisted_name)]
|
||||
|
||||
fn test(foo: ()) {} //~ERROR use of a blacklisted/placeholder name `foo`
|
||||
|
|
Loading…
Reference in New Issue