2018-08-30 20:18:55 +08:00
|
|
|
//@ run-pass
|
2018-09-26 05:51:35 +08:00
|
|
|
#![allow(unused_variables)]
|
2015-03-23 04:13:15 +08:00
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
|
2024-02-07 10:42:01 +08:00
|
|
|
trait Foo<T> { fn dummy(&self, arg: T) { } } //~ WARN method `dummy` is never used
|
2014-12-20 18:29:19 +08:00
|
|
|
|
|
|
|
trait Bar<A> {
|
|
|
|
fn method<B>(&self) where A: Foo<B>;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
struct X;
|
|
|
|
|
|
|
|
impl Foo<S> for X {}
|
|
|
|
|
2015-02-12 23:29:52 +08:00
|
|
|
impl Bar<X> for i32 {
|
2014-12-20 18:29:19 +08:00
|
|
|
fn method<U>(&self) where X: Foo<U> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
1.method::<S>();
|
|
|
|
}
|