about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-11-16 19:22:48 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-11-21 12:44:51 -0800
commitef833d41014481acdfc19bfd50f27f662dba8a2b (patch)
tree33d854748f777d562f64c94d45b0b79f6ff1945c /src/test
parent77ef4e717667ddbe925a81efc85994662183a445 (diff)
downloadrust-ef833d41014481acdfc19bfd50f27f662dba8a2b.tar.gz
rust-ef833d41014481acdfc19bfd50f27f662dba8a2b.zip
Introduce a T_err type for type errors
This allows more errors to be non-fatal, as per #1871.

I only went through and started changing span_fatal to span_err in
check.rs. There are probably more errors that could be made
non-fatal. So if you see derived type errors appearing from now on,
file a bug!

r=graydon

Closes #1871
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/cast-from-nil.rs2
-rw-r--r--src/test/compile-fail/cast-to-nil.rs2
-rw-r--r--src/test/compile-fail/extern-no-call.rs2
-rw-r--r--src/test/compile-fail/issue-1871.rs7
-rw-r--r--src/test/compile-fail/issue-2149.rs2
5 files changed, 8 insertions, 7 deletions
diff --git a/src/test/compile-fail/cast-from-nil.rs b/src/test/compile-fail/cast-from-nil.rs
index a76df00d0d5..b7cf35e6f1b 100644
--- a/src/test/compile-fail/cast-from-nil.rs
+++ b/src/test/compile-fail/cast-from-nil.rs
@@ -1,2 +1,2 @@
-// error-pattern: cast from nil: () as u32
+// error-pattern: cast from nil: `()` as `u32`
 fn main() { let u = (assert true) as u32; }
\ No newline at end of file
diff --git a/src/test/compile-fail/cast-to-nil.rs b/src/test/compile-fail/cast-to-nil.rs
index 44c0f5a1da2..5c5d456484a 100644
--- a/src/test/compile-fail/cast-to-nil.rs
+++ b/src/test/compile-fail/cast-to-nil.rs
@@ -1,2 +1,2 @@
-// error-pattern: cast to nil: u32 as ()
+// error-pattern: cast to nil: `u32` as `()`
 fn main() { let u = 0u32 as (); }
\ No newline at end of file
diff --git a/src/test/compile-fail/extern-no-call.rs b/src/test/compile-fail/extern-no-call.rs
index e53f4ee6940..4ed32e16d33 100644
--- a/src/test/compile-fail/extern-no-call.rs
+++ b/src/test/compile-fail/extern-no-call.rs
@@ -1,4 +1,4 @@
-// error-pattern:expected function or foreign function but found *u8
+// error-pattern:expected function or foreign function but found `*u8`
 extern fn f() {
 }
 
diff --git a/src/test/compile-fail/issue-1871.rs b/src/test/compile-fail/issue-1871.rs
index 6937dbdce07..99458b835f0 100644
--- a/src/test/compile-fail/issue-1871.rs
+++ b/src/test/compile-fail/issue-1871.rs
@@ -1,11 +1,12 @@
-// xfail-test
+// Tests that we don't generate a spurious error about f.honk's type
+// being undeterminable
 fn main() {
   let f = 42;
 
   let _g = if f < 5 {
-      f.honk();
+      f.honk() //~ ERROR attempted access of field `honk`
   }
   else {
-    12
+      ()
   };
 }
diff --git a/src/test/compile-fail/issue-2149.rs b/src/test/compile-fail/issue-2149.rs
index eb8da1519e8..b9ccfc66703 100644
--- a/src/test/compile-fail/issue-2149.rs
+++ b/src/test/compile-fail/issue-2149.rs
@@ -11,5 +11,5 @@ impl<A> ~[A]: vec_monad<A> {
    }
 }
 fn main() {
-    ["hi"].bind({|x| [x] });
+    ["hi"].bind({|x| [x] }); //~ ERROR attempted access of field `bind`
 }