2016-01-02 09:57:55 +00:00
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
|
|
|
// Here we expect a coherence conflict because, even though `i32` does
|
|
|
|
// not implement `Iterator`, we cannot rely on that negative reasoning
|
|
|
|
// due to the orphan rules. Therefore, `A::Item` may yet turn out to
|
|
|
|
// be `i32`.
|
|
|
|
|
2017-02-25 21:16:27 +00:00
|
|
|
pub trait Foo<P> { fn foo() {} }
|
2016-01-02 09:57:55 +00:00
|
|
|
|
|
|
|
pub trait Bar {
|
|
|
|
type Output: 'static;
|
|
|
|
}
|
|
|
|
|
2016-01-30 00:25:18 +00:00
|
|
|
impl Foo<i32> for i32 { }
|
2016-01-02 09:57:55 +00:00
|
|
|
|
2018-12-28 23:11:13 +00:00
|
|
|
impl<A:Iterator> Foo<A::Item> for A { }
|
2019-10-26 15:28:02 +00:00
|
|
|
//~^ ERROR E0119
|
2016-01-02 09:57:55 +00:00
|
|
|
|
|
|
|
fn main() {}
|