From 4cffa9b4e3f8a733cf77de844489afa2ccaef5d0 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 1 Mar 2016 22:05:54 -0500 Subject: convert coherence-cow to use revisions --- src/test/compile-fail/coherence-cow-1.rs | 28 ------------------- src/test/compile-fail/coherence-cow-2.rs | 27 ------------------ src/test/compile-fail/coherence-cow-no-cover.rs | 23 --------------- src/test/compile-fail/coherence-cow.rs | 37 +++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 78 deletions(-) delete mode 100644 src/test/compile-fail/coherence-cow-1.rs delete mode 100644 src/test/compile-fail/coherence-cow-2.rs delete mode 100644 src/test/compile-fail/coherence-cow-no-cover.rs create mode 100644 src/test/compile-fail/coherence-cow.rs (limited to 'src') diff --git a/src/test/compile-fail/coherence-cow-1.rs b/src/test/compile-fail/coherence-cow-1.rs deleted file mode 100644 index 530bbf57d91..00000000000 --- a/src/test/compile-fail/coherence-cow-1.rs +++ /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 or the MIT license -// , 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); - -impl Remote for Pair> { } -//~^ 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 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 or the MIT license -// , 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); - -impl Remote for Pair,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 or the MIT license -// , 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); - -impl Remote for Pair,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 index 00000000000..6a2d1bac493 --- /dev/null +++ b/src/test/compile-fail/coherence-cow.rs @@ -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 or the MIT license +// , 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); + +#[cfg(a)] +impl Remote for Pair> { } //[a]~ ERROR E0210 + +#[cfg(b)] +impl Remote for Pair,T> { } //[b]~ ERROR E0210 + +#[cfg(c)] +impl Remote for Pair,U> { } +//[c]~^ ERROR type parameter `T` must be used as the type parameter for some local type + +fn main() { } -- cgit 1.4.1-3-g733a5