]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-20225.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-20225.stderr
CommitLineData
8faf50e0 1error[E0053]: method `call` has an incompatible type for trait
cdc7bbd5 2 --> $DIR/issue-20225.rs:6:43
8faf50e0 3 |
60c5eb7d
XL
4LL | impl<'a, T> Fn<(&'a T,)> for Foo {
5 | - this type parameter
8faf50e0 6LL | extern "rust-call" fn call(&self, (_,): (T,)) {}
cdc7bbd5
XL
7 | ^^^^
8 | |
9 | expected `&T`, found type parameter `T`
10 | help: change the parameter type to match the trait: `(&'a T,)`
8faf50e0 11 |
60c5eb7d
XL
12 = note: expected fn pointer `extern "rust-call" fn(&Foo, (&'a T,))`
13 found fn pointer `extern "rust-call" fn(&Foo, (T,))`
8faf50e0
XL
14
15error[E0053]: method `call_mut` has an incompatible type for trait
cdc7bbd5 16 --> $DIR/issue-20225.rs:11:51
8faf50e0 17 |
60c5eb7d
XL
18LL | impl<'a, T> FnMut<(&'a T,)> for Foo {
19 | - this type parameter
8faf50e0 20LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
cdc7bbd5
XL
21 | ^^^^
22 | |
23 | expected `&T`, found type parameter `T`
24 | help: change the parameter type to match the trait: `(&'a T,)`
8faf50e0 25 |
60c5eb7d
XL
26 = note: expected fn pointer `extern "rust-call" fn(&mut Foo, (&'a T,))`
27 found fn pointer `extern "rust-call" fn(&mut Foo, (T,))`
8faf50e0
XL
28
29error[E0053]: method `call_once` has an incompatible type for trait
cdc7bbd5 30 --> $DIR/issue-20225.rs:18:47
8faf50e0 31 |
60c5eb7d
XL
32LL | impl<'a, T> FnOnce<(&'a T,)> for Foo {
33 | - this type parameter
34...
8faf50e0 35LL | extern "rust-call" fn call_once(self, (_,): (T,)) {}
cdc7bbd5
XL
36 | ^^^^
37 | |
38 | expected `&T`, found type parameter `T`
39 | help: change the parameter type to match the trait: `(&'a T,)`
8faf50e0 40 |
60c5eb7d
XL
41 = note: expected fn pointer `extern "rust-call" fn(Foo, (&'a T,))`
42 found fn pointer `extern "rust-call" fn(Foo, (T,))`
8faf50e0
XL
43
44error: aborting due to 3 previous errors
45
46For more information about this error, try `rustc --explain E0053`.