about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Holk <eric.holk@gmail.com>2012-06-15 14:05:16 -0700
committerEric Holk <eric.holk@gmail.com>2012-06-21 16:11:11 -0700
commitbb572b4234df9c206ed97606c9e1c2dd40e06dab (patch)
treea2ff86dff710e166e283e9008621075ae04327f3
parentf21fbc23d28eebccb903540740212c6e191d1ecc (diff)
downloadrust-bb572b4234df9c206ed97606c9e1c2dd40e06dab.tar.gz
rust-bb572b4234df9c206ed97606c9e1c2dd40e06dab.zip
Updating errors in vec-add.rs
-rw-r--r--src/test/compile-fail/vec-add.rs48
1 files changed, 29 insertions, 19 deletions
diff --git a/src/test/compile-fail/vec-add.rs b/src/test/compile-fail/vec-add.rs
index 2d96f0c6810..d4a0ce0cfed 100644
--- a/src/test/compile-fail/vec-add.rs
+++ b/src/test/compile-fail/vec-add.rs
@@ -6,23 +6,23 @@ fn add(i: [int], m: [mut int], c: [const int]) {
 
    add(i + [3],
        m + [3],
-       c + [3]);
+       [3]);
 
    add(i + [mut 3],
        m + [mut 3],
-       c + [mut 3]);
+       [mut 3]);
 
    add(i + i,
        m + i,
-       c + i);
+       i);
 
    add(i + m,
        m + m,
-       c + m);
+       m);
 
    add(i + c,
        m + c,
-       c + c);
+       c);
 
    add(m + [3], //! ERROR mismatched types
        m + [3],
@@ -33,8 +33,10 @@ fn add(i: [int], m: [mut int], c: [const int]) {
        i + [3]);
 
    add(c + [3], //! ERROR mismatched types
-       c + [3], //! ERROR mismatched types
-       c + [3]);
+                //!^ ERROR binary operation + cannot be applied
+       c + [3], //! ERROR binary operation + cannot be applied
+                //!^ mismatched types
+       [3]);
 
    add(m + [mut 3], //! ERROR mismatched types
        m + [mut 3],
@@ -44,9 +46,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
        i + [mut 3], //! ERROR mismatched types
        i + [mut 3]);
 
-   add(c + [mut 3], //! ERROR mismatched types
-       c + [mut 3], //! ERROR mismatched types
-       c + [mut 3]);
+   add(c + [mut 3], //! ERROR binary operation + cannot be applied
+                    //!^ mismatched types
+       c + [mut 3], //! ERROR binary operation + cannot be applied
+                    //!^ mismatched types
+       [mut 3]);
 
    add(m + i, //! ERROR mismatched types
        m + i,
@@ -56,9 +60,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
        i + i, //! ERROR mismatched types
        i + i);
 
-   add(c + i, //! ERROR mismatched types
-       c + i, //! ERROR mismatched types
-       c + i);
+   add(c + i, //! ERROR binary operation + cannot be applied
+              //!^ ERROR mismatched types
+       c + i, //! ERROR binary operation + cannot be applied
+              //!^ ERROR mismatched types
+       i);
 
    add(m + m, //! ERROR mismatched types
        m + m,
@@ -68,9 +74,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
        i + m, //! ERROR mismatched types
        i + m);
 
-   add(c + m, //! ERROR mismatched types
-       c + m, //! ERROR mismatched types
-       c + m);
+   add(c + m, //! ERROR binary operation + cannot be applied
+              //!^ ERROR mismatched types
+       c + m, //! ERROR binary operation + cannot be applied
+              //!^ ERROR mismatched types
+       m);
 
    add(m + c, //! ERROR mismatched types
        m + c,
@@ -80,9 +88,11 @@ fn add(i: [int], m: [mut int], c: [const int]) {
        i + c, //! ERROR mismatched types
        i + c);
 
-   add(c + c, //! ERROR mismatched types
-       c + c, //! ERROR mismatched types
-       c + c);
+   add(c + c, //! ERROR binary operation + cannot be applied
+              //!^ ERROR mismatched types
+       c + c, //! ERROR binary operation + cannot be applied
+              //!^ ERROR mismatched types
+       c);
 }
 
 fn main() {