about summary refs log tree commit diff
path: root/src/test/auxiliary
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-03-30 17:49:30 -0400
committerNiko Matsakis <niko@alum.mit.edu>2015-04-01 11:21:42 -0400
commitb0af587b64786b45ac9651ee4608e1edbd53a733 (patch)
tree37a50a180106f37ff82070977dd69164edba5b3c /src/test/auxiliary
parent35c261aea0d891d31b3fda83da653cb1e385681f (diff)
downloadrust-b0af587b64786b45ac9651ee4608e1edbd53a733.tar.gz
rust-b0af587b64786b45ac9651ee4608e1edbd53a733.zip
Update tests for new coherence rules, and add a swatch of new tests
probing the specifics of `Fundamental`.

Fixes #23086.
Fixes #23516.
Diffstat (limited to 'src/test/auxiliary')
-rw-r--r--src/test/auxiliary/coherence_copy_like_lib.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/auxiliary/coherence_copy_like_lib.rs b/src/test/auxiliary/coherence_copy_like_lib.rs
new file mode 100644
index 00000000000..a1e1b48c2c4
--- /dev/null
+++ b/src/test/auxiliary/coherence_copy_like_lib.rs
@@ -0,0 +1,22 @@
+// 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.
+
+#![crate_type = "rlib"]
+#![feature(fundamental)]
+
+use std::marker::MarkerTrait;
+
+pub trait MyCopy : MarkerTrait { }
+impl MyCopy for i32 { }
+
+pub struct MyStruct<T>(T);
+
+#[fundamental]
+pub struct MyFundamentalStruct<T>(T);