Skip to content

Commit fb116e5

Browse files
committed
---
yaml --- r: 10643 b: refs/heads/snap-stage3 c: bb572b4 h: refs/heads/master i: 10641: a591060 10639: 5cef5a1 v: v3
1 parent e642590 commit fb116e5

File tree

2 files changed

+30
-20
lines changed

2 files changed

+30
-20
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f21fbc23d28eebccb903540740212c6e191d1ecc
4+
refs/heads/snap-stage3: bb572b4234df9c206ed97606c9e1c2dd40e06dab
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/test/compile-fail/vec-add.rs

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ fn add(i: [int], m: [mut int], c: [const int]) {
66

77
add(i + [3],
88
m + [3],
9-
c + [3]);
9+
[3]);
1010

1111
add(i + [mut 3],
1212
m + [mut 3],
13-
c + [mut 3]);
13+
[mut 3]);
1414

1515
add(i + i,
1616
m + i,
17-
c + i);
17+
i);
1818

1919
add(i + m,
2020
m + m,
21-
c + m);
21+
m);
2222

2323
add(i + c,
2424
m + c,
25-
c + c);
25+
c);
2626

2727
add(m + [3], //! ERROR mismatched types
2828
m + [3],
@@ -33,8 +33,10 @@ fn add(i: [int], m: [mut int], c: [const int]) {
3333
i + [3]);
3434

3535
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]);
3840

3941
add(m + [mut 3], //! ERROR mismatched types
4042
m + [mut 3],
@@ -44,9 +46,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
4446
i + [mut 3], //! ERROR mismatched types
4547
i + [mut 3]);
4648

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]);
5054

5155
add(m + i, //! ERROR mismatched types
5256
m + i,
@@ -56,9 +60,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
5660
i + i, //! ERROR mismatched types
5761
i + i);
5862

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);
6268

6369
add(m + m, //! ERROR mismatched types
6470
m + m,
@@ -68,9 +74,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
6874
i + m, //! ERROR mismatched types
6975
i + m);
7076

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);
7482

7583
add(m + c, //! ERROR mismatched types
7684
m + c,
@@ -80,9 +88,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
8088
i + c, //! ERROR mismatched types
8189
i + c);
8290

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);
8696
}
8797

8898
fn main() {

0 commit comments

Comments
 (0)