]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-21974.rs
Enable full revision in const generics ui tests
[rust.git] / src / test / ui / issues / issue-21974.rs
1 // Test that (for now) we report an ambiguity error here, because
2 // specific trait relationships are ignored for the purposes of trait
3 // matching. This behavior should likely be improved such that this
4 // test passes. See #21974 for more details.
5
6 trait Foo {
7     fn foo(self);
8 }
9
10 fn foo<'a,'b,T>(x: &'a T, y: &'b T)
11     where &'a T : Foo, //~ ERROR type annotations needed
12           &'b T : Foo
13 {
14     x.foo();
15     y.foo();
16 }
17
18 fn main() { }