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