Addressed PR comments

This commit is contained in:
Alexandru Ene 2017-11-03 20:54:33 +00:00
parent 9d01468bc7
commit f92c91601e
3 changed files with 7 additions and 7 deletions

View file

@ -156,9 +156,9 @@ impl<'a, 'tcx, 'b> SimilarNamesNameVisitor<'a, 'tcx, 'b> {
if interned_name.chars().all(|c| c.is_digit(10) || c == '_') {
span_lint(
self.0.cx,
JUST_UNDERSCORES_AND_NUMBERS,
JUST_UNDERSCORES_AND_DIGITS,
span,
"binding whose name is just underscores and digits",
"consider choosing a more descriptive name",
);
return;
}

View file

@ -129,21 +129,21 @@ error: 5th binding whose name is just one char
129 | e => panic!(),
| ^
error: binding whose name is just underscores and digits
error: consider choosing a more descriptive name
--> $DIR/non_expressive_names.rs:139:9
|
139 | let _1 = 1; //~ERROR Consider a more descriptive name
| ^^
|
= note: `-D just-underscores-and-numbers` implied by `-D warnings`
= note: `-D just-underscores-and-digits` implied by `-D warnings`
error: binding whose name is just underscores and digits
error: consider choosing a more descriptive name
--> $DIR/non_expressive_names.rs:140:9
|
140 | let ____1 = 1; //~ERROR Consider a more descriptive name
| ^^^^^
error: binding whose name is just underscores and digits
error: consider choosing a more descriptive name
--> $DIR/non_expressive_names.rs:141:9
|
141 | let __1___2 = 12; //~ERROR Consider a more descriptive name