Skip to content

Commit 718ee98

Browse files
committed
More descriptive identifiers.
1 parent c34e9b3 commit 718ee98

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/test/run-pass/simple-anon-objs.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
use std;
22

33
fn main() {
4-
obj a() {
4+
obj normal() {
55
fn foo() -> int { ret 2; }
66
}
7-
auto my_a = a();
8-
// Extending an object with a new method
7+
auto my_normal_obj = normal();
98

10-
auto my_b = obj {
9+
// Extending an object with a new method
10+
auto my_anon_obj = obj {
1111
fn bar() -> int {
1212
ret 3;
1313
}
14-
with my_a
14+
with my_normal_obj
1515
};
1616

17-
assert (my_a.foo() == 2);
18-
assert (my_b.bar() == 3);
17+
assert (my_normal_obj.foo() == 2);
18+
assert (my_anon_obj.bar() == 3);
1919

20-
auto my_c = obj {
20+
auto another_anon_obj = obj {
2121
fn baz() -> int {
2222
ret 4;
2323
}
24-
with my_b
24+
with my_anon_obj
2525
};
2626

27-
assert (my_c.baz() == 4);
27+
assert (another_anon_obj.baz() == 4);
2828

2929
}
30-

0 commit comments

Comments
 (0)