Skip to content

Commit 2b3e882

Browse files
committed
---
yaml --- r: 35279 b: refs/heads/master c: 976e1ce h: refs/heads/master i: 35277: 350a779 35275: f1b291d 35271: 764c36a 35263: e650357 v: v3
1 parent 7fe106d commit 2b3e882

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9e1c9be16f9140e09f26de947fddf806c27a957f
2+
refs/heads/master: 976e1ced0037d88bcd0f32d6e831125b7710a73a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
trait Foo<T> {
2+
fn get() -> T;
3+
}
4+
5+
struct S {
6+
x: int
7+
}
8+
9+
impl S : Foo<int> {
10+
fn get() -> int {
11+
self.x
12+
}
13+
}
14+
15+
fn main() {
16+
let x = @S { x: 1 };
17+
let y = x as @Foo<int>;
18+
assert y.get() == 1;
19+
}
20+

0 commit comments

Comments
 (0)