Skip to content

Commit ed2a391

Browse files
committed
---
yaml --- r: 37470 b: refs/heads/try c: 762101b h: refs/heads/master v: v3
1 parent dd8d3a0 commit ed2a391

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
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: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: b90d7d4c817743234f33695837b2e0aa7bf01d3a
5+
refs/heads/try: 762101b72ae49218f22a99d25ba71a6319f809c8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/libsyntax/fold.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,15 @@ fn noop_fold_item_underscore(i: item_, fld: ast_fold) -> item_ {
258258
*methods, |x| fld.fold_method(*x))))
259259
}
260260
item_trait(tps, traits, methods) => {
261+
let methods = do methods.map |method| {
262+
match *method {
263+
required(*) => copy *method,
264+
provided(method) => provided(fld.fold_method(method))
265+
}
266+
};
261267
item_trait(fold_ty_params(tps, fld),
262268
vec::map(traits, |p| fold_trait_ref(*p, fld)),
263-
/* FIXME (#2543) */ copy methods)
269+
move methods)
264270
}
265271
item_mac(m) => {
266272
// FIXME #2888: we might actually want to do something here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
trait Foo {
2+
fn bar() -> ~str {
3+
fmt!("test")
4+
}
5+
}
6+
7+
enum Baz {
8+
Quux
9+
}
10+
11+
impl Baz: Foo {
12+
}
13+
14+
fn main() {
15+
let q = Quux;
16+
assert q.bar() == ~"test";
17+
}

0 commit comments

Comments
 (0)