diff options
Diffstat (limited to 'tests/ui/where-clauses/where-clause-method-substituion-rpass.rs')
-rw-r--r-- | tests/ui/where-clauses/where-clause-method-substituion-rpass.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs b/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs new file mode 100644 index 000000000..daa3c8dd8 --- /dev/null +++ b/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs @@ -0,0 +1,23 @@ +// run-pass +#![allow(unused_variables)] +// pretty-expanded FIXME #23616 + +trait Foo<T> { fn dummy(&self, arg: T) { } } + +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>(); +} |