File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: c34e9b33d9d9252ea343b08d4f4a70c59896e0e9
2
+ refs/heads/master: 718ee98f43e7feecb38249a3519174054e3b7c79
Original file line number Diff line number Diff line change 1
1
use std;
2
2
3
3
fn main ( ) {
4
- obj a ( ) {
4
+ obj normal ( ) {
5
5
fn foo ( ) -> int { ret 2 ; }
6
6
}
7
- auto my_a = a ( ) ;
8
- // Extending an object with a new method
7
+ auto my_normal_obj = normal ( ) ;
9
8
10
- auto my_b = obj {
9
+ // Extending an object with a new method
10
+ auto my_anon_obj = obj {
11
11
fn bar( ) -> int {
12
12
ret 3 ;
13
13
}
14
- with my_a
14
+ with my_normal_obj
15
15
} ;
16
16
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 ) ;
19
19
20
- auto my_c = obj {
20
+ auto another_anon_obj = obj {
21
21
fn baz( ) -> int {
22
22
ret 4 ;
23
23
}
24
- with my_b
24
+ with my_anon_obj
25
25
} ;
26
26
27
- assert ( my_c . baz ( ) == 4 ) ;
27
+ assert ( another_anon_obj . baz ( ) == 4 ) ;
28
28
29
29
}
30
-
You can’t perform that action at this time.
0 commit comments