Skip to content

Commit 6628401

Browse files
committed
---
yaml --- r: 42449 b: refs/heads/try c: 8bde2c1 h: refs/heads/master i: 42447: 1ac1260 v: v3
1 parent f07117e commit 6628401

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
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: 19dfec2aaf746535de1521f68421f9980dbf25de
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5-
refs/heads/try: a2ec5400ffd083fac935ba43b6d60a6bdccbb1d6
5+
refs/heads/try: 8bde2c1d6533bf693dbb6ae8105bb082ad0ff0fe
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/librustc/front/test.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,17 @@ fn fold_item(cx: test_ctxt, &&i: @ast::item, fld: fold::ast_fold) ->
145145
}
146146

147147
fn is_test_fn(i: @ast::item) -> bool {
148-
let has_test_attr =
149-
vec::len(attr::find_attrs_by_name(i.attrs, ~"test")) > 0u;
148+
let has_test_attr = attr::find_attrs_by_name(i.attrs,
149+
~"test").is_not_empty();
150150

151151
fn has_test_signature(i: @ast::item) -> bool {
152-
match /*bad*/copy i.node {
153-
ast::item_fn(decl, _, tps, _) => {
154-
let input_cnt = vec::len(decl.inputs);
152+
match &i.node {
153+
&ast::item_fn(ref decl, _, ref tps, _) => {
155154
let no_output = match decl.output.node {
156155
ast::ty_nil => true,
157156
_ => false
158157
};
159-
let tparm_cnt = vec::len(tps);
160-
input_cnt == 0u && no_output && tparm_cnt == 0u
158+
decl.inputs.is_empty() && no_output && tps.is_empty()
161159
}
162160
_ => false
163161
}

0 commit comments

Comments
 (0)