]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0401.rs
Auto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgr
[rust.git] / src / test / ui / error-codes / E0401.rs
1 trait Baz<T> {}
2
3 fn foo<T>(x: T) {
4     fn bfnr<U, V: Baz<U>, W: Fn()>(y: T) { //~ ERROR E0401
5     }
6     fn baz<U,
7            V: Baz<U>,
8            W: Fn()>
9            (y: T) { //~ ERROR E0401
10     }
11     bfnr(x);
12     //~^ ERROR type annotations needed
13     //~| ERROR type annotations needed
14 }
15
16
17 struct A<T> {
18     inner: T,
19 }
20
21 impl<T> Iterator for A<T> {
22     type Item = u8;
23     fn next(&mut self) -> Option<u8> {
24         fn helper(sel: &Self) -> u8 { //~ ERROR E0401
25             unimplemented!();
26         }
27         Some(helper(self))
28     }
29 }
30
31 fn main() {
32 }