]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-20225.stderr
Remove E0308 note when primary label has all info
[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    = help: type parameters must be constrained to match other types
12    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
13
14 error[E0053]: method `call_mut` has an incompatible type for trait
15   --> $DIR/issue-20225.rs:11:3
16    |
17 LL | impl<'a, T> FnMut<(&'a T,)> for Foo {
18    |          - this type parameter
19 LL |   extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
20    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &T, found type parameter `T`
21    |
22    = note: expected fn pointer `extern "rust-call" fn(&mut Foo, (&'a T,))`
23               found fn pointer `extern "rust-call" fn(&mut Foo, (T,))`
24    = help: type parameters must be constrained to match other types
25    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
26
27 error[E0053]: method `call_once` has an incompatible type for trait
28   --> $DIR/issue-20225.rs:18:3
29    |
30 LL | impl<'a, T> FnOnce<(&'a T,)> for Foo {
31    |          - this type parameter
32 ...
33 LL |   extern "rust-call" fn call_once(self, (_,): (T,)) {}
34    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &T, found type parameter `T`
35    |
36    = note: expected fn pointer `extern "rust-call" fn(Foo, (&'a T,))`
37               found fn pointer `extern "rust-call" fn(Foo, (T,))`
38    = help: type parameters must be constrained to match other types
39    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
40
41 error: aborting due to 3 previous errors
42
43 For more information about this error, try `rustc --explain E0053`.