2016-01-02 03:57:55 -06: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 15:16:27 -06:00
|
|
|
pub trait Foo<P> { fn foo() {} }
|
2016-01-02 03:57:55 -06:00
|
|
|
|
|
|
|
pub trait Bar {
|
|
|
|
type Output: 'static;
|
|
|
|
}
|
|
|
|
|
2016-01-29 18:25:18 -06:00
|
|
|
impl Foo<i32> for i32 { }
|
2016-01-02 03:57:55 -06:00
|
|
|
|
2018-12-28 17:11:13 -06:00
|
|
|
impl<A:Iterator> Foo<A::Item> for A { }
|
2019-10-26 10:28:02 -05:00
|
|
|
//~^ ERROR E0119
|
2016-01-02 03:57:55 -06:00
|
|
|
|
|
|
|
fn main() {}
|