]> git.lizzy.rs Git - rust.git/commitdiff
convert coherence-cow to use revisions
authorNiko Matsakis <niko@alum.mit.edu>
Wed, 2 Mar 2016 03:05:54 +0000 (22:05 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Wed, 2 Mar 2016 10:16:26 +0000 (05:16 -0500)
src/test/compile-fail/coherence-cow-1.rs [deleted file]
src/test/compile-fail/coherence-cow-2.rs [deleted file]
src/test/compile-fail/coherence-cow-no-cover.rs [deleted file]
src/test/compile-fail/coherence-cow.rs [new file with mode: 0644]

diff --git a/src/test/compile-fail/coherence-cow-1.rs b/src/test/compile-fail/coherence-cow-1.rs
deleted file mode 100644 (file)
index 530bbf5..0000000
+++ /dev/null
@@ -1,28 +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
-
-// pretty-expanded FIXME #23616
-
-// 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.
-
-extern crate coherence_lib as lib;
-use lib::{Remote,Pair};
-
-pub struct Cover<T>(T);
-
-impl<T> Remote for Pair<T,Cover<T>> { }
-//~^ ERROR E0210
-
-fn main() { }
diff --git a/src/test/compile-fail/coherence-cow-2.rs b/src/test/compile-fail/coherence-cow-2.rs
deleted file mode 100644 (file)
index 52abcea..0000000
+++ /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 (file)
index cd32e79..0000000
+++ /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.rs b/src/test/compile-fail/coherence-cow.rs
new file mode 100644 (file)
index 0000000..6a2d1ba
--- /dev/null
@@ -0,0 +1,37 @@
+// 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.
+
+// revisions: a b c
+
+// aux-build:coherence_lib.rs
+
+// pretty-expanded FIXME #23616
+
+// 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.
+
+extern crate coherence_lib as lib;
+use lib::{Remote,Pair};
+
+pub struct Cover<T>(T);
+
+#[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() { }