@@ -6,23 +6,23 @@ fn add(i: [int], m: [mut int], c: [const int]) {
6
6
7
7
add ( i + [ 3 ] ,
8
8
m + [ 3 ] ,
9
- c + [ 3 ] ) ;
9
+ [ 3 ] ) ;
10
10
11
11
add ( i + [ mut 3 ] ,
12
12
m + [ mut 3 ] ,
13
- c + [ mut 3 ] ) ;
13
+ [ mut 3 ] ) ;
14
14
15
15
add ( i + i,
16
16
m + i,
17
- c + i) ;
17
+ i) ;
18
18
19
19
add ( i + m,
20
20
m + m,
21
- c + m) ;
21
+ m) ;
22
22
23
23
add ( i + c,
24
24
m + c,
25
- c + c ) ;
25
+ c) ;
26
26
27
27
add ( m + [ 3 ] , //! ERROR mismatched types
28
28
m + [ 3 ] ,
@@ -33,8 +33,10 @@ fn add(i: [int], m: [mut int], c: [const int]) {
33
33
i + [ 3 ] ) ;
34
34
35
35
add ( c + [ 3 ] , //! ERROR mismatched types
36
- c + [ 3 ] , //! ERROR mismatched types
37
- c + [ 3 ] ) ;
36
+ //!^ ERROR binary operation + cannot be applied
37
+ c + [ 3 ] , //! ERROR binary operation + cannot be applied
38
+ //!^ mismatched types
39
+ [ 3 ] ) ;
38
40
39
41
add ( m + [ mut 3 ] , //! ERROR mismatched types
40
42
m + [ mut 3 ] ,
@@ -44,9 +46,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
44
46
i + [ mut 3 ] , //! ERROR mismatched types
45
47
i + [ mut 3 ] ) ;
46
48
47
- add ( c + [ mut 3 ] , //! ERROR mismatched types
48
- c + [ mut 3 ] , //! ERROR mismatched types
49
- c + [ mut 3 ] ) ;
49
+ add ( c + [ mut 3 ] , //! ERROR binary operation + cannot be applied
50
+ //!^ mismatched types
51
+ c + [ mut 3 ] , //! ERROR binary operation + cannot be applied
52
+ //!^ mismatched types
53
+ [ mut 3 ] ) ;
50
54
51
55
add ( m + i, //! ERROR mismatched types
52
56
m + i,
@@ -56,9 +60,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
56
60
i + i, //! ERROR mismatched types
57
61
i + i) ;
58
62
59
- add ( c + i, //! ERROR mismatched types
60
- c + i, //! ERROR mismatched types
61
- c + i) ;
63
+ add ( c + i, //! ERROR binary operation + cannot be applied
64
+ //!^ ERROR mismatched types
65
+ c + i, //! ERROR binary operation + cannot be applied
66
+ //!^ ERROR mismatched types
67
+ i) ;
62
68
63
69
add ( m + m, //! ERROR mismatched types
64
70
m + m,
@@ -68,9 +74,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
68
74
i + m, //! ERROR mismatched types
69
75
i + m) ;
70
76
71
- add ( c + m, //! ERROR mismatched types
72
- c + m, //! ERROR mismatched types
73
- c + m) ;
77
+ add ( c + m, //! ERROR binary operation + cannot be applied
78
+ //!^ ERROR mismatched types
79
+ c + m, //! ERROR binary operation + cannot be applied
80
+ //!^ ERROR mismatched types
81
+ m) ;
74
82
75
83
add ( m + c, //! ERROR mismatched types
76
84
m + c,
@@ -80,9 +88,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
80
88
i + c, //! ERROR mismatched types
81
89
i + c) ;
82
90
83
- add ( c + c, //! ERROR mismatched types
84
- c + c, //! ERROR mismatched types
85
- c + c) ;
91
+ add ( c + c, //! ERROR binary operation + cannot be applied
92
+ //!^ ERROR mismatched types
93
+ c + c, //! ERROR binary operation + cannot be applied
94
+ //!^ ERROR mismatched types
95
+ c) ;
86
96
}
87
97
88
98
fn main ( ) {
0 commit comments