about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-02-28 14:25:26 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-03-02 10:32:04 +0300
commitbc93fbc32fca4d70182bf330f0c99a7852a36f17 (patch)
tree594b59612b39cf9ea5b7204b41ad95abe22b6353 /src/test
parent9047b201bf7b106203080c8a3993b5b8d921a133 (diff)
downloadrust-bc93fbc32fca4d70182bf330f0c99a7852a36f17.tar.gz
rust-bc93fbc32fca4d70182bf330f0c99a7852a36f17.zip
Add test (fixes #27340)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/issue-27340.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-27340.rs b/src/test/compile-fail/issue-27340.rs
new file mode 100644
index 00000000000..6a97ae82ddf
--- /dev/null
+++ b/src/test/compile-fail/issue-27340.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.
+
+struct Foo;
+#[derive(Copy, Clone)]
+//~^ ERROR the trait `Copy` may not be implemented for this type; field `0` does not implement
+struct Bar(Foo);
+
+fn main() {}