]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-37767.rs
Merge commit '27afd6ade4bb1123a8bf82001629b69d23d62aff' into clippyup
[rust.git] / src / test / ui / span / issue-37767.rs
1 trait A {
2     fn foo(&mut self) {}
3 }
4
5 trait B : A {
6     fn foo(&mut self) {}
7 }
8
9 fn bar<T: B>(a: &T) {
10     a.foo() //~ ERROR multiple applicable items
11 }
12
13 trait C {
14     fn foo(&self) {}
15 }
16
17 trait D : C {
18     fn foo(&self) {}
19 }
20
21 fn quz<T: D>(a: &T) {
22     a.foo() //~ ERROR multiple applicable items
23 }
24
25 trait E : Sized {
26     fn foo(self) {}
27 }
28
29 trait F : E {
30     fn foo(self) {}
31 }
32
33 fn foo<T: F>(a: T) {
34     a.foo() //~ ERROR multiple applicable items
35 }
36
37 fn pass<T: C>(a: &T) {
38     a.foo()
39 }
40
41 fn main() {}