about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-05-23 04:48:15 +0000
committerbors <bors@rust-lang.org>2017-05-23 04:48:15 +0000
commit852b7cb91ed44f6cc77f855bd8281da4accbd2fb (patch)
tree0baca5f9b17776de133ffdd4f67bd728006279b9 /src/test/compile-fail
parent2e9139197e908435673c62a14381fbd4f8166319 (diff)
parentaa7762f91fc6ee18faf477800d9e5bddb8637507 (diff)
downloadrust-852b7cb91ed44f6cc77f855bd8281da4accbd2fb.tar.gz
rust-852b7cb91ed44f6cc77f855bd8281da4accbd2fb.zip
Auto merge of #42165 - frewsxcv:rollup, r=frewsxcv
Rollup of 8 pull requests

- Successful merges: #42016, #42122, #42144, #42145, #42151, #42152, #42160, #42163
- Failed merges:
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/feature-gate-loop-break-value.rs15
-rw-r--r--src/test/compile-fail/isssue-38821.rs43
-rw-r--r--src/test/compile-fail/loop-break-value.rs1
3 files changed, 43 insertions, 16 deletions
diff --git a/src/test/compile-fail/feature-gate-loop-break-value.rs b/src/test/compile-fail/feature-gate-loop-break-value.rs
deleted file mode 100644
index 1632c40d59f..00000000000
--- a/src/test/compile-fail/feature-gate-loop-break-value.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// 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 main() {
-    loop {
-        break 123; //~ ERROR `break` with a value is experimental
-    }
-}
diff --git a/src/test/compile-fail/isssue-38821.rs b/src/test/compile-fail/isssue-38821.rs
new file mode 100644
index 00000000000..63de780e109
--- /dev/null
+++ b/src/test/compile-fail/isssue-38821.rs
@@ -0,0 +1,43 @@
+// Copyright 2017 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.
+
+pub struct Nullable<T: NotNull>(T);
+
+pub trait NotNull {}
+
+pub trait IntoNullable {
+    type Nullable;
+}
+
+impl<T: NotNull> IntoNullable for T {
+    type Nullable = Nullable<T>;
+}
+
+impl<T: NotNull> IntoNullable for Nullable<T> {
+    type Nullable = Nullable<T>;
+}
+
+pub trait Expression {
+    type SqlType;
+}
+
+pub trait Column: Expression {}
+
+#[derive(Debug, Copy, Clone)]
+//~^ ERROR the trait bound `<Col as Expression>::SqlType: NotNull` is not satisfied
+pub enum ColumnInsertValue<Col, Expr> where
+    Col: Column,
+    Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>,
+{
+    Expression(Col, Expr),
+    Default(Col),
+}
+
+fn main() {}
diff --git a/src/test/compile-fail/loop-break-value.rs b/src/test/compile-fail/loop-break-value.rs
index a4143218992..938f7fba2a0 100644
--- a/src/test/compile-fail/loop-break-value.rs
+++ b/src/test/compile-fail/loop-break-value.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(loop_break_value)]
 #![feature(never_type)]
 
 fn main() {