about summary refs log tree commit diff
path: root/src/test/compile-fail/syntaxt-default-trait-impls.rs
diff options
context:
space:
mode:
authorFlavio Percoco <flaper87@gmail.com>2015-01-27 01:07:31 +0100
committerFlavio Percoco <flaper87@gmail.com>2015-02-22 02:14:26 +0100
commit7213ef1a8fd3cb7e479d53fdb287c6c612b9fb93 (patch)
tree9032ce53716586ff272b78a46b1a0beb9da2c96e /src/test/compile-fail/syntaxt-default-trait-impls.rs
parent0be1e430cf8762095178cb8c94a17f1bab32a191 (diff)
downloadrust-7213ef1a8fd3cb7e479d53fdb287c6c612b9fb93.tar.gz
rust-7213ef1a8fd3cb7e479d53fdb287c6c612b9fb93.zip
Test all the things
Diffstat (limited to 'src/test/compile-fail/syntaxt-default-trait-impls.rs')
-rw-r--r--src/test/compile-fail/syntaxt-default-trait-impls.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/compile-fail/syntaxt-default-trait-impls.rs b/src/test/compile-fail/syntaxt-default-trait-impls.rs
new file mode 100644
index 00000000000..a33cd0edca5
--- /dev/null
+++ b/src/test/compile-fail/syntaxt-default-trait-impls.rs
@@ -0,0 +1,18 @@
+// 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.
+
+#![feature(optin_builtin_traits)]
+
+trait MyDefaultImpl {}
+
+impl<T> MyDefaultImpl for .. {}
+//~^ ERROR default trait implementations are not allowed to have genercis
+
+fn main() {}