1 // revisions: re_a re_b re_c
3 #![cfg_attr(any(), re_a, re_b, re_c)]
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>> { }
19 //[re_a]~^ ERROR E0117
22 impl<T> Remote for Pair<Cover<T>,T> { }
23 //[re_b]~^ ERROR E0117
26 impl<T,U> Remote for Pair<Cover<T>,U> { }
27 //[re_c]~^ ERROR E0117