about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@squareup.com>2014-12-22 20:21:43 -0800
committerTamir Duberstein <tamird@squareup.com>2014-12-28 09:22:52 -0800
commitee6b97d5af6b6cf78732b994cda5c244c8b99436 (patch)
tree3bc20b76a5d11216f6737fc719bb821513b7d317
parentdd8fdff4fb6cbf63ef47e4a29c2cfb63e21f9744 (diff)
downloadrust-ee6b97d5af6b6cf78732b994cda5c244c8b99436.tar.gz
rust-ee6b97d5af6b6cf78732b994cda5c244c8b99436.zip
Regression test for simple case of #9197
-rw-r--r--src/test/compile-fail/duplicate-trait-bounds.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/compile-fail/duplicate-trait-bounds.rs b/src/test/compile-fail/duplicate-trait-bounds.rs
new file mode 100644
index 00000000000..d9aa9d9dfcc
--- /dev/null
+++ b/src/test/compile-fail/duplicate-trait-bounds.rs
@@ -0,0 +1,15 @@
+// Copyright 2014 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.
+
+trait Foo {}
+
+fn foo<T: Foo + Foo>() {} //~ ERROR `Foo` already appears in the list of bounds
+
+fn main() {}