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 52abceab98b6..000000000000 --- 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 cd32e797ae9b..000000000000 --- 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-1.rs b/src/test/compile-fail/coherence-cow.rs similarity index 74% rename from src/test/compile-fail/coherence-cow-1.rs rename to src/test/compile-fail/coherence-cow.rs index 530bbf57d910..6a2d1bac4938 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); -impl Remote for Pair> { } -//~^ ERROR E0210 +#[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() { }