Skip to content

Commit 0d37400

Browse files
committed
---
yaml --- r: 52331 b: refs/heads/dist-snap c: 8bde2c1 h: refs/heads/master i: 52329: f10cfff 52327: 40bd4a1 v: v3
1 parent 364ce29 commit 0d37400

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
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: a2ec5400ffd083fac935ba43b6d60a6bdccbb1d6
10+
refs/heads/dist-snap: 8bde2c1d6533bf693dbb6ae8105bb082ad0ff0fe
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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)