summaryrefslogtreecommitdiffstats
path: root/src/test/ui/coherence/coherence-projection-conflict-ty-param.rs
blob: 3e4141fa8cb1e1d21a370ffe2ac01de176d3a331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Coherence error results because we do not know whether `T: Foo<P>` or not
// for the second impl.

use std::marker::PhantomData;

pub trait Foo<P> { fn foo() {} }

impl <P, T: Foo<P>> Foo<P> for Option<T> {}

impl<T, U> Foo<T> for Option<U> { }
//~^ ERROR E0119

fn main() {}