11error[E0053]: method `call` has an incompatible type for trait
22 --> $DIR/issue-20225.rs:6:3
33 |
4+ LL | impl<'a, T> Fn<(&'a T,)> for Foo {
5+ | - this type parameter
46LL | extern "rust-call" fn call(&self, (_,): (T,)) {}
5- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
7+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T`
68 |
79 = note: expected type `extern "rust-call" fn(&Foo, (&'a T,))`
810 found type `extern "rust-call" fn(&Foo, (T,))`
@@ -12,8 +14,10 @@ LL | extern "rust-call" fn call(&self, (_,): (T,)) {}
1214error[E0053]: method `call_mut` has an incompatible type for trait
1315 --> $DIR/issue-20225.rs:12:3
1416 |
17+ LL | impl<'a, T> FnMut<(&'a T,)> for Foo {
18+ | - this type parameter
1519LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
16- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
20+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T`
1721 |
1822 = note: expected type `extern "rust-call" fn(&mut Foo, (&'a T,))`
1923 found type `extern "rust-call" fn(&mut Foo, (T,))`
@@ -23,8 +27,11 @@ LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
2327error[E0053]: method `call_once` has an incompatible type for trait
2428 --> $DIR/issue-20225.rs:20:3
2529 |
30+ LL | impl<'a, T> FnOnce<(&'a T,)> for Foo {
31+ | - this type parameter
32+ ...
2633LL | extern "rust-call" fn call_once(self, (_,): (T,)) {}
27- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
34+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T`
2835 |
2936 = note: expected type `extern "rust-call" fn(Foo, (&'a T,))`
3037 found type `extern "rust-call" fn(Foo, (T,))`
0 commit comments