From bb572b4234df9c206ed97606c9e1c2dd40e06dab Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Fri, 15 Jun 2012 14:05:16 -0700 Subject: [PATCH] Updating errors in vec-add.rs --- src/test/compile-fail/vec-add.rs | 48 +++++++++++++++++++------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/src/test/compile-fail/vec-add.rs b/src/test/compile-fail/vec-add.rs index 2d96f0c68108..d4a0ce0cfed3 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() {