2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(unused_variables)]
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2015-02-12 09:29:52 -06:00
|
|
|
trait Foo<T> { fn dummy(&self, arg: T) { } }
|
2014-12-20 04:29:19 -06:00
|
|
|
|
|
|
|
trait Bar<A> {
|
|
|
|
fn method<B>(&self) where A: Foo<B>;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
struct X;
|
|
|
|
|
|
|
|
impl Foo<S> for X {}
|
|
|
|
|
2015-02-12 09:29:52 -06:00
|
|
|
impl Bar<X> for i32 {
|
2014-12-20 04:29:19 -06:00
|
|
|
fn method<U>(&self) where X: Foo<U> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
1.method::<S>();
|
|
|
|
}
|