about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-08-24 10:29:12 -0700
committerGitHub <noreply@github.com>2016-08-24 10:29:12 -0700
commit03e23c7f9a10b18e1687bfd92c6807e9342aa00b (patch)
tree63747bf53a862ae6d67d12c7a41d4e73ec26ba5a /src/test/compile-fail
parent308824acecf902f2b6a9c1538bde0324804ba68e (diff)
parent702ea7169cc20f3e572576e68339edc0b8fc5939 (diff)
downloadrust-03e23c7f9a10b18e1687bfd92c6807e9342aa00b.tar.gz
rust-03e23c7f9a10b18e1687bfd92c6807e9342aa00b.zip
Auto merge of #35883 - durka:gh35849, r=eddyb
typeck: use NoExpectation to check return type of diverging fn

Fixes #35849.

Thanks @eddyb.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/diverging-fn-tail-35849.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/compile-fail/diverging-fn-tail-35849.rs b/src/test/compile-fail/diverging-fn-tail-35849.rs
new file mode 100644
index 00000000000..6dc447b4dc8
--- /dev/null
+++ b/src/test/compile-fail/diverging-fn-tail-35849.rs
@@ -0,0 +1,16 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn _converge() -> ! { //~ ERROR computation may converge
+    42
+}
+
+fn main() { }
+