about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2016-03-01 22:05:54 -0500
committerNiko Matsakis <niko@alum.mit.edu>2016-03-02 05:16:26 -0500
commit4cffa9b4e3f8a733cf77de844489afa2ccaef5d0 (patch)
treee428d26f1144e09f6c31b75f777ccd304f1547f1 /src/test
parentc5bdc35b606505940333fc605daae2532ca5710c (diff)
downloadrust-4cffa9b4e3f8a733cf77de844489afa2ccaef5d0.tar.gz
rust-4cffa9b4e3f8a733cf77de844489afa2ccaef5d0.zip
convert coherence-cow to use revisions
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/coherence-cow-2.rs27
-rw-r--r--src/test/compile-fail/coherence-cow-no-cover.rs23
-rw-r--r--src/test/compile-fail/coherence-cow.rs (renamed from src/test/compile-fail/coherence-cow-1.rs)13
3 files changed, 11 insertions, 52 deletions
diff --git a/src/test/compile-fail/coherence-cow-2.rs b/src/test/compile-fail/coherence-cow-2.rs
deleted file mode 100644
index 52abceab98b..00000000000
--- a/src/test/compile-fail/coherence-cow-2.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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.
-
-// aux-build:coherence_lib.rs
-
-// Test that the `Pair` type reports an error if it contains type
-// parameters, even when they are covered by local types. This test
-// was originally intended to test the opposite, but the rules changed
-// with RFC 1023 and this became illegal.
-
-// pretty-expanded FIXME #23616
-
-extern crate coherence_lib as lib;
-use lib::{Remote,Pair};
-
-pub struct Cover<T>(T);
-
-impl<T> Remote for Pair<Cover<T>,T> { } //~ ERROR E0210
-
-fn main() { }
diff --git a/src/test/compile-fail/coherence-cow-no-cover.rs b/src/test/compile-fail/coherence-cow-no-cover.rs
deleted file mode 100644
index cd32e797ae9..00000000000
--- a/src/test/compile-fail/coherence-cow-no-cover.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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.
-
-// aux-build:coherence_lib.rs
-
-// Test that it's not ok for T to appear uncovered
-
-extern crate coherence_lib as lib;
-use lib::{Remote,Pair};
-
-pub struct Cover<T>(T);
-
-impl<T,U> Remote for Pair<Cover<T>,U> { }
-//~^ ERROR type parameter `T` must be used as the type parameter for some local type
-
-fn main() { }
diff --git a/src/test/compile-fail/coherence-cow-1.rs b/src/test/compile-fail/coherence-cow.rs
index 530bbf57d91..6a2d1bac493 100644
--- a/src/test/compile-fail/coherence-cow-1.rs
+++ b/src/test/compile-fail/coherence-cow.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// revisions: a b c
+
 // aux-build:coherence_lib.rs
 
 // pretty-expanded FIXME #23616
@@ -22,7 +24,14 @@ use lib::{Remote,Pair};
 
 pub struct Cover<T>(T);
 
-impl<T> Remote for Pair<T,Cover<T>> { }
-//~^ ERROR E0210
+#[cfg(a)]
+impl<T> Remote for Pair<T,Cover<T>> { } //[a]~ ERROR E0210
+
+#[cfg(b)]
+impl<T> Remote for Pair<Cover<T>,T> { } //[b]~ ERROR E0210
+
+#[cfg(c)]
+impl<T,U> Remote for Pair<Cover<T>,U> { }
+//[c]~^ ERROR type parameter `T` must be used as the type parameter for some local type
 
 fn main() { }