Skip to content

Commit 9f7bcc9

Browse files
committed
---
yaml --- r: 188130 b: refs/heads/try c: fe2e097 h: refs/heads/master v: v3
1 parent 680fbcc commit 9f7bcc9

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 38e97b99a6b133cb4c621c68e75b28abc6c617c1
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: 8a7b6b3ee6a85aa60a1733727a4028a690744fdf
5+
refs/heads/try: fe2e0976decadb94cecc4ab85abdd02345cc7a64
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustc_lint/builtin.rs

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,26 +1218,17 @@ impl LintPass for UnusedImportBraces {
12181218
}
12191219

12201220
fn check_item(&mut self, cx: &Context, item: &ast::Item) {
1221-
match item.node {
1222-
ast::ItemUse(ref view_path) => {
1223-
match view_path.node {
1224-
ast::ViewPathList(_, ref items) => {
1225-
if items.len() == 1 {
1226-
match items[0].node {
1227-
ast::PathListIdent {ref name, ..} => {
1228-
let m = format!("braces around {} is unnecessary",
1229-
&token::get_ident(*name));
1230-
cx.span_lint(UNUSED_IMPORT_BRACES, item.span,
1231-
&m[..]);
1232-
},
1233-
_ => ()
1234-
}
1235-
}
1221+
if let ast::ItemUse(ref view_path) = item.node {
1222+
if let ast::ViewPathList(_, ref items) = view_path.node {
1223+
if items.len() == 1 {
1224+
if let ast::PathListIdent {ref name, ..} = items[0].node {
1225+
let m = format!("braces around {} is unnecessary",
1226+
&token::get_ident(*name));
1227+
cx.span_lint(UNUSED_IMPORT_BRACES, item.span,
1228+
&m[..]);
12361229
}
1237-
_ => ()
12381230
}
1239-
},
1240-
_ => ()
1231+
}
12411232
}
12421233
}
12431234
}

0 commit comments

Comments
 (0)