about summary refs log tree commit diff
path: root/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs
blob: da75ed796c00fa2197fe7de323ef826888d13fb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//@ run-pass
#![allow(unused_variables)]

trait Foo<T> { fn dummy(&self, arg: T) { } } //~ WARN method `dummy` is never used

trait Bar<A> {
    fn method<B>(&self) where A: Foo<B>;
}

struct S;
struct X;

impl Foo<S> for X {}

impl Bar<X> for i32 {
    fn method<U>(&self) where X: Foo<U> {
    }
}

fn main() {
    1.method::<S>();
}