Closed alex-dukhno closed 4 years ago
Can you provide a minimal git repo or something which I could cargo build
to reproduce this?
Hi, thank you for quick response.
Seems like the case is much more complicated then I thought ...
I created repo https://github.com/alex-dukhno/async-trait-cross-crates-compilation, but I couldn't reproduce the exact error ... but I got the other ...
Trait has Self::Item
return value in
https://github.com/alex-dukhno/async-trait-cross-crates-compilation/blob/master/src/interface/src/lib.rs#L9
but I had to return reference in impl https://github.com/alex-dukhno/async-trait-cross-crates-compilation/blob/master/src/implementation/src/some_module.rs#L14 otherwise I got compilation error
error[E0053]: method `item` has an incompatible type for trait
--> src/implementation/src/some_module.rs:14:5
|
14 | fn item(&self) -> Self::Item {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&some_module::OtherImplementation`, found struct `some_module::OtherImplementation`
|
= note: expected fn pointer `fn(&some_module::Implementation) -> &some_module::OtherImplementation`
found fn pointer `fn(&some_module::Implementation) -> some_module::OtherImplementation`
I don't know if it suits you but I can give you a link to the branch of my repo where original problem can be reproduced. Here it is https://github.com/alex-dukhno/database/tree/initial-extraction-of-api-for-pg-wire-protocol
It looks like you've provided your own implementation of core
here which has an API that is different from libcore (https://doc.rust-lang.org/core/). Similar to std
, core
is reserved in Rust to refer to crates which provide the API of libcore, so I am not surprised that it leads to problems. I'll close this issue since a nonstandard libcore is not a setup that we could support.
Thanks. Then I’ll rename the create
Hi there,
I've got the following case:
when I compiling the project I got the following compiler error:
Thank you