1 error[E0053]: method `call` has an incompatible type for trait
2 --> $DIR/issue-20225.rs:6:3
4 LL | impl<'a, T> Fn<(&'a T,)> for Foo {
5 | - this type parameter
6 LL | extern "rust-call" fn call(&self, (_,): (T,)) {}
7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &T, found type parameter `T`
9 = note: expected fn pointer `extern "rust-call" fn(&Foo, (&'a T,))`
10 found fn pointer `extern "rust-call" fn(&Foo, (T,))`
11 = help: type parameters must be constrained to match other types
12 = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
14 error[E0053]: method `call_mut` has an incompatible type for trait
15 --> $DIR/issue-20225.rs:11:3
17 LL | impl<'a, T> FnMut<(&'a T,)> for Foo {
18 | - this type parameter
19 LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &T, found type parameter `T`
22 = note: expected fn pointer `extern "rust-call" fn(&mut Foo, (&'a T,))`
23 found fn pointer `extern "rust-call" fn(&mut Foo, (T,))`
24 = help: type parameters must be constrained to match other types
25 = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
27 error[E0053]: method `call_once` has an incompatible type for trait
28 --> $DIR/issue-20225.rs:18:3
30 LL | impl<'a, T> FnOnce<(&'a T,)> for Foo {
31 | - this type parameter
33 LL | extern "rust-call" fn call_once(self, (_,): (T,)) {}
34 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &T, found type parameter `T`
36 = note: expected fn pointer `extern "rust-call" fn(Foo, (&'a T,))`
37 found fn pointer `extern "rust-call" fn(Foo, (T,))`
38 = help: type parameters must be constrained to match other types
39 = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
41 error: aborting due to 3 previous errors
43 For more information about this error, try `rustc --explain E0053`.