about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLuke Gallagher <luke@hypergeometric.net>2015-04-07 11:31:28 +1000
committerLuke Gallagher <luke@hypergeometric.net>2015-04-07 18:00:39 +1000
commit7eb723d794312c03c0c49d1ddf4875dacc86eb83 (patch)
treecf9fe4368e44c804297e5e1e289c31cc3464cfdd
parentc52d46e778f48f12452b65455614a249e4365066 (diff)
downloadrust-7eb723d794312c03c0c49d1ddf4875dacc86eb83.tar.gz
rust-7eb723d794312c03c0c49d1ddf4875dacc86eb83.zip
Add test for #22560
Closes #22560
-rw-r--r--src/test/compile-fail/issue-22560.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-22560.rs b/src/test/compile-fail/issue-22560.rs
new file mode 100644
index 00000000000..d7a71213a3f
--- /dev/null
+++ b/src/test/compile-fail/issue-22560.rs
@@ -0,0 +1,19 @@
+// Copyright 2015 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.
+
+use std::ops::{Add, Sub};
+
+type Test = Add +
+            //~^ ERROR the type parameter `RHS` must be explicitly specified in an object type because its default value `Self` references the type `Self`
+            Sub;
+            //~^ ERROR only the builtin traits can be used as closure or object bounds
+
+fn main() {
+}