1 // revisions: a b c re_a re_b re_c
3 #![cfg_attr(any(re_a, re_b, re_c), feature(re_rebalance_coherence))]
5 // aux-build:coherence_lib.rs
7 // Test that the `Pair` type reports an error if it contains type
8 // parameters, even when they are covered by local types. This test
9 // was originally intended to test the opposite, but the rules changed
10 // with RFC 1023 and this became illegal.
12 extern crate coherence_lib as lib;
13 use lib::{Remote,Pair};
15 pub struct Cover<T>(T);
18 impl<T> Remote for Pair<T,Cover<T>> { }
20 //[re_a]~^^ ERROR E0117
23 impl<T> Remote for Pair<Cover<T>,T> { }
25 //[re_b]~^^ ERROR E0117
28 impl<T,U> Remote for Pair<Cover<T>,U> { }
29 //[c]~^ ERROR type parameter `T` must be used as the type parameter for some local type
30 //[re_c]~^^ ERROR E0117