about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-03-17 11:48:18 -0400
committerNiko Matsakis <niko@alum.mit.edu>2017-03-30 07:55:29 -0400
commit1ae620bbebadbe4362a28b37bcecd41cfed66cea (patch)
tree9acf3cbd13242401e66ce902d37510540c40599d /src/test/compile-fail
parent4967f1ae57120b02639f3d1493e8f0c9e168b0dc (diff)
downloadrust-1ae620bbebadbe4362a28b37bcecd41cfed66cea.tar.gz
rust-1ae620bbebadbe4362a28b37bcecd41cfed66cea.zip
do not eagerly convert `!` to a diverging variable
Instead, wait until coercion time.  This has some small effects on a few
tests (one less temporary, generally better errors when trying to call
methods or otherwise "force" the type).
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/index-bot.rs2
-rw-r--r--src/test/compile-fail/issue-13847.rs2
-rw-r--r--src/test/compile-fail/issue-15207.rs2
-rw-r--r--src/test/compile-fail/issue-15965.rs2
-rw-r--r--src/test/compile-fail/issue-17373.rs2
-rw-r--r--src/test/compile-fail/issue-18532.rs3
6 files changed, 6 insertions, 7 deletions
diff --git a/src/test/compile-fail/index-bot.rs b/src/test/compile-fail/index-bot.rs
index 70c362303ae..05b04723300 100644
--- a/src/test/compile-fail/index-bot.rs
+++ b/src/test/compile-fail/index-bot.rs
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn main() {
-    (return)[0]; //~ ERROR the type of this value must be known in this context
+    (return)[0]; //~ ERROR cannot index a value of type `!`
 }
diff --git a/src/test/compile-fail/issue-13847.rs b/src/test/compile-fail/issue-13847.rs
index aa823d9a70e..0314f109a7c 100644
--- a/src/test/compile-fail/issue-13847.rs
+++ b/src/test/compile-fail/issue-13847.rs
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn main() {
-    return.is_failure //~ ERROR the type of this value must be known in this context
+    return.is_failure //~ ERROR no field `is_failure` on type `!`
 }
diff --git a/src/test/compile-fail/issue-15207.rs b/src/test/compile-fail/issue-15207.rs
index 61877775269..70da8cf4169 100644
--- a/src/test/compile-fail/issue-15207.rs
+++ b/src/test/compile-fail/issue-15207.rs
@@ -10,7 +10,7 @@
 
 fn main() {
     loop {
-        break.push(1) //~ ERROR the type of this value must be known in this context
+        break.push(1) //~ ERROR no method named `push` found for type `!`
         ;
     }
 }
diff --git a/src/test/compile-fail/issue-15965.rs b/src/test/compile-fail/issue-15965.rs
index 08b896f387b..d5d597c190e 100644
--- a/src/test/compile-fail/issue-15965.rs
+++ b/src/test/compile-fail/issue-15965.rs
@@ -11,7 +11,7 @@
 fn main() {
     return
         { return () }
-//~^ ERROR the type of this value must be known in this context
+//~^ ERROR expected function, found `!`
     ()
     ;
 }
diff --git a/src/test/compile-fail/issue-17373.rs b/src/test/compile-fail/issue-17373.rs
index 6895893adc4..f6e6a8a0852 100644
--- a/src/test/compile-fail/issue-17373.rs
+++ b/src/test/compile-fail/issue-17373.rs
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 fn main() {
-    *return //~ ERROR the type of this value must be known in this context
+    *return //~ ERROR type `!` cannot be dereferenced
     ;
 }
diff --git a/src/test/compile-fail/issue-18532.rs b/src/test/compile-fail/issue-18532.rs
index 94eab97c42a..2be5fdcac4e 100644
--- a/src/test/compile-fail/issue-18532.rs
+++ b/src/test/compile-fail/issue-18532.rs
@@ -13,6 +13,5 @@
 // into it.
 
 fn main() {
-    (return)((),());
-    //~^ ERROR the type of this value must be known
+    (return)((),()); //~ ERROR expected function, found `!`
 }