about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-05-01 00:23:34 +0100
committervarkor <github@varkor.com>2018-05-01 00:23:34 +0100
commit5a013b2fbcd2eebc8345ccd1611e39b867b4c1f8 (patch)
tree9aa3a91e3c5d5f7be44af5ba7baa2f82bf1a1f83 /src
parent9b2890196eba62fdfec09447305e197642d1c612 (diff)
downloadrust-5a013b2fbcd2eebc8345ccd1611e39b867b4c1f8.tar.gz
rust-5a013b2fbcd2eebc8345ccd1611e39b867b4c1f8.zip
Fix coerce-to-bang test
This was explicitly testing the behaviour which is now no longer permitted.
Diffstat (limited to 'src')
-rw-r--r--src/test/compile-fail/coerce-to-bang.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/compile-fail/coerce-to-bang.rs b/src/test/compile-fail/coerce-to-bang.rs
index 62ff09f4616..4a0e31d2deb 100644
--- a/src/test/compile-fail/coerce-to-bang.rs
+++ b/src/test/compile-fail/coerce-to-bang.rs
@@ -56,9 +56,8 @@ fn call_foo_f() {
 }
 
 fn array_a() {
-    // Accepted: return is coerced to `!` just fine, and then `22` can be
-    // because we already diverged.
-    let x: [!; 2] = [return, 22];
+    // Accepted: return is coerced to `!` just fine, but `22` cannot be.
+    let x: [!; 2] = [return, 22]; //~ ERROR mismatched types
 }
 
 fn array_b() {