rust/tests/ui/where-clauses/where-clause-method-substit...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
369 B
Rust
Raw Normal View History

//@ run-pass
#![allow(unused_variables)]
//@ 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
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>();
}