fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1.8 KiB36 linesraw
1error[E0053]: method `call` has an incompatible type for trait
2  --> $DIR/issue-20225.rs:6:3
3   |
4LL |   extern "rust-call" fn call(&self, (_,): (T,)) {}
5   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
6   |
7   = note: expected type `extern "rust-call" fn(&Foo, (&'a T,))`
8              found type `extern "rust-call" fn(&Foo, (T,))`
9   = help: type parameters must be constrained to match other types
10   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
11
12error[E0053]: method `call_mut` has an incompatible type for trait
13  --> $DIR/issue-20225.rs:12:3
14   |
15LL |   extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
16   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
17   |
18   = note: expected type `extern "rust-call" fn(&mut Foo, (&'a T,))`
19              found type `extern "rust-call" fn(&mut Foo, (T,))`
20   = help: type parameters must be constrained to match other types
21   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
22
23error[E0053]: method `call_once` has an incompatible type for trait
24  --> $DIR/issue-20225.rs:20:3
25   |
26LL |   extern "rust-call" fn call_once(self, (_,): (T,)) {}
27   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter
28   |
29   = note: expected type `extern "rust-call" fn(Foo, (&'a T,))`
30              found type `extern "rust-call" fn(Foo, (T,))`
31   = help: type parameters must be constrained to match other types
32   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
33
34error: aborting due to 3 previous errors
35
36For more information about this error, try `rustc --explain E0053`.