Merge pull request #3081 from mikerite/fix-3078

Fix #3078
This commit is contained in:
Oliver Schneider 2018-08-31 09:05:39 +02:00 committed by GitHub
commit 73e8416df3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 6 deletions

View File

@ -114,6 +114,9 @@ impl<'a, 'tcx: 'a, 'b> Visitor<'tcx> for SimilarNamesNameVisitor<'a, 'tcx, 'b> {
_ => walk_pat(self, pat),
}
}
fn visit_mac(&mut self, _mac: &Mac) {
// do not check macs
}
}
fn get_whitelist(interned_name: &str) -> Option<&'static [&'static str]> {

View File

@ -147,6 +147,13 @@ fn issue2927() {
format!("{:?}", 2);
}
fn issue3078() {
match "a" {
stringify!(a) => {},
_ => {}
}
}
struct Bar;
impl Bar {

View File

@ -150,21 +150,21 @@ error: consider choosing a more descriptive name
| ^^^^^^^
error: consider choosing a more descriptive name
--> $DIR/non_expressive_names.rs:154:13
--> $DIR/non_expressive_names.rs:161:13
|
154 | let _1 = 1;
161 | let _1 = 1;
| ^^
error: consider choosing a more descriptive name
--> $DIR/non_expressive_names.rs:155:13
--> $DIR/non_expressive_names.rs:162:13
|
155 | let ____1 = 1;
162 | let ____1 = 1;
| ^^^^^
error: consider choosing a more descriptive name
--> $DIR/non_expressive_names.rs:156:13
--> $DIR/non_expressive_names.rs:163:13
|
156 | let __1___2 = 12;
163 | let __1___2 = 12;
| ^^^^^^^
error: aborting due to 17 previous errors