]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-20225.stderr
Auto merge of #84100 - sjakobi:77548-reenable-check, r=jyn514
[rust.git] / src / test / ui / issues / issue-20225.stderr
1 error[E0053]: method `call` has an incompatible type for trait
2   --> $DIR/issue-20225.rs:6:3
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`
8    |
9    = note: expected fn pointer `extern "rust-call" fn(&Foo, (&'a T,))`
10               found fn pointer `extern "rust-call" fn(&Foo, (T,))`
11
12 error[E0053]: method `call_mut` has an incompatible type for trait
13   --> $DIR/issue-20225.rs:11:3
14    |
15 LL | impl<'a, T> FnMut<(&'a T,)> for Foo {
16    |          - this type parameter
17 LL |   extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
18    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T`
19    |
20    = note: expected fn pointer `extern "rust-call" fn(&mut Foo, (&'a T,))`
21               found fn pointer `extern "rust-call" fn(&mut Foo, (T,))`
22
23 error[E0053]: method `call_once` has an incompatible type for trait
24   --> $DIR/issue-20225.rs:18:3
25    |
26 LL | impl<'a, T> FnOnce<(&'a T,)> for Foo {
27    |          - this type parameter
28 ...
29 LL |   extern "rust-call" fn call_once(self, (_,): (T,)) {}
30    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T`
31    |
32    = note: expected fn pointer `extern "rust-call" fn(Foo, (&'a T,))`
33               found fn pointer `extern "rust-call" fn(Foo, (T,))`
34
35 error: aborting due to 3 previous errors
36
37 For more information about this error, try `rustc --explain E0053`.