2018-07-15 16:11:54 -05:00
|
|
|
error[E0053]: method `call` has an incompatible type for trait
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-20225.rs:6:3
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-10-31 22:58:37 -05:00
|
|
|
LL | impl<'a, T> Fn<(&'a T,)> for Foo {
|
|
|
|
| - this type parameter
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | extern "rust-call" fn call(&self, (_,): (T,)) {}
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected fn pointer `extern "rust-call" fn(&Foo, (&'a T,))`
|
|
|
|
found fn pointer `extern "rust-call" fn(&Foo, (T,))`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error[E0053]: method `call_mut` has an incompatible type for trait
|
2019-11-15 01:45:30 -06:00
|
|
|
--> $DIR/issue-20225.rs:11:3
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-10-31 22:58:37 -05:00
|
|
|
LL | impl<'a, T> FnMut<(&'a T,)> for Foo {
|
|
|
|
| - this type parameter
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected fn pointer `extern "rust-call" fn(&mut Foo, (&'a T,))`
|
|
|
|
found fn pointer `extern "rust-call" fn(&mut Foo, (T,))`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error[E0053]: method `call_once` has an incompatible type for trait
|
2019-11-15 01:45:30 -06:00
|
|
|
--> $DIR/issue-20225.rs:18:3
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-10-31 22:58:37 -05:00
|
|
|
LL | impl<'a, T> FnOnce<(&'a T,)> for Foo {
|
|
|
|
| - this type parameter
|
|
|
|
...
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | extern "rust-call" fn call_once(self, (_,): (T,)) {}
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected fn pointer `extern "rust-call" fn(Foo, (&'a T,))`
|
|
|
|
found fn pointer `extern "rust-call" fn(Foo, (T,))`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0053`.
|