]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0053]: method `call` has an incompatible type for trait |
cdc7bbd5 | 2 | --> $DIR/issue-20225.rs:6:43 |
8faf50e0 | 3 | | |
60c5eb7d XL |
4 | LL | impl<'a, T> Fn<(&'a T,)> for Foo { |
5 | | - this type parameter | |
8faf50e0 | 6 | LL | extern "rust-call" fn call(&self, (_,): (T,)) {} |
cdc7bbd5 XL |
7 | | ^^^^ |
8 | | | | |
9 | | expected `&T`, found type parameter `T` | |
10 | | help: change the parameter type to match the trait: `(&'a T,)` | |
8faf50e0 | 11 | | |
60c5eb7d XL |
12 | = note: expected fn pointer `extern "rust-call" fn(&Foo, (&'a T,))` |
13 | found fn pointer `extern "rust-call" fn(&Foo, (T,))` | |
8faf50e0 XL |
14 | |
15 | error[E0053]: method `call_mut` has an incompatible type for trait | |
cdc7bbd5 | 16 | --> $DIR/issue-20225.rs:11:51 |
8faf50e0 | 17 | | |
60c5eb7d XL |
18 | LL | impl<'a, T> FnMut<(&'a T,)> for Foo { |
19 | | - this type parameter | |
8faf50e0 | 20 | LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {} |
cdc7bbd5 XL |
21 | | ^^^^ |
22 | | | | |
23 | | expected `&T`, found type parameter `T` | |
24 | | help: change the parameter type to match the trait: `(&'a T,)` | |
8faf50e0 | 25 | | |
60c5eb7d XL |
26 | = note: expected fn pointer `extern "rust-call" fn(&mut Foo, (&'a T,))` |
27 | found fn pointer `extern "rust-call" fn(&mut Foo, (T,))` | |
8faf50e0 XL |
28 | |
29 | error[E0053]: method `call_once` has an incompatible type for trait | |
cdc7bbd5 | 30 | --> $DIR/issue-20225.rs:18:47 |
8faf50e0 | 31 | | |
60c5eb7d XL |
32 | LL | impl<'a, T> FnOnce<(&'a T,)> for Foo { |
33 | | - this type parameter | |
34 | ... | |
8faf50e0 | 35 | LL | extern "rust-call" fn call_once(self, (_,): (T,)) {} |
cdc7bbd5 XL |
36 | | ^^^^ |
37 | | | | |
38 | | expected `&T`, found type parameter `T` | |
39 | | help: change the parameter type to match the trait: `(&'a T,)` | |
8faf50e0 | 40 | | |
60c5eb7d XL |
41 | = note: expected fn pointer `extern "rust-call" fn(Foo, (&'a T,))` |
42 | found fn pointer `extern "rust-call" fn(Foo, (T,))` | |
8faf50e0 XL |
43 | |
44 | error: aborting due to 3 previous errors | |
45 | ||
46 | For more information about this error, try `rustc --explain E0053`. |