1
1
error[E0053]: method `call` has an incompatible type for trait
2
2
--> $DIR/issue-20225.rs:6:3
3
3
|
4
+ LL | impl<'a, T> Fn<(&'a T,)> for Foo {
5
+ | - this type parameter
4
6
LL | extern "rust-call" fn call(&self, (_,): (T,)) {}
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
7
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T`
6
8
|
7
9
= note: expected type `extern "rust-call" fn(&Foo, (&'a T,))`
8
10
found type `extern "rust-call" fn(&Foo, (T,))`
@@ -12,8 +14,10 @@ LL | extern "rust-call" fn call(&self, (_,): (T,)) {}
12
14
error[E0053]: method `call_mut` has an incompatible type for trait
13
15
--> $DIR/issue-20225.rs:12:3
14
16
|
17
+ LL | impl<'a, T> FnMut<(&'a T,)> for Foo {
18
+ | - this type parameter
15
19
LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
16
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
20
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T`
17
21
|
18
22
= note: expected type `extern "rust-call" fn(&mut Foo, (&'a T,))`
19
23
found type `extern "rust-call" fn(&mut Foo, (T,))`
@@ -23,8 +27,11 @@ LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
23
27
error[E0053]: method `call_once` has an incompatible type for trait
24
28
--> $DIR/issue-20225.rs:20:3
25
29
|
30
+ LL | impl<'a, T> FnOnce<(&'a T,)> for Foo {
31
+ | - this type parameter
32
+ ...
26
33
LL | extern "rust-call" fn call_once(self, (_,): (T,)) {}
27
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
34
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T`
28
35
|
29
36
= note: expected type `extern "rust-call" fn(Foo, (&'a T,))`
30
37
found type `extern "rust-call" fn(Foo, (T,))`
0 commit comments