Skip to content

[issue?] fail compile in rust 1.43.0 #423

@Stvchm9703

Description

@Stvchm9703

environment

rustc 1.43.0-nightly (d3c79346a 2020-02-29)
window 10

###what is going on
I just used the tonic library to build my server,
then I updated my compile, and it raised this error

A:\Gitrepo\unlight-zwei-game-duel-service>cargo run
   Compiling tower-balance v0.3.0
error[E0034]: multiple applicable items in scope
   --> C:\Users\Steven Chm\.cargo\registry\src\github.com-1ecc6299db9ec823\tower-balance-0.3.0\src\pool\mod.rs:373:47
    |
373 |         if let Poll::Ready(()) = self.balance.poll_ready(cx)? {
    |                                               ^^^^^^^^^^ multiple `poll_ready` found
    |
note: candidate #1 is defined in an impl of the trait `tower_service::Service` for the type `p2c::service::Balance<_, _>`
   --> C:\Users\Steven Chm\.cargo\registry\src\github.com-1ecc6299db9ec823\tower-balance-0.3.0\src\p2c\service.rs:234:5
    |
234 |     fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: candidate #2 is defined in an impl of the trait `tower_make::make_service::MakeService` for the type `_`
help: disambiguate the method call for candidate #1
    |
373 |         if let Poll::Ready(()) = tower_service::Service::poll_ready(&mut self.balance, cx)? {
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the method call for candidate #2
    |
373 |         if let Poll::Ready(()) = tower_make::make_service::MakeService::poll_ready(&mut self.balance, cx)? {
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0034]: multiple applicable items in scope
   --> C:\Users\Steven Chm\.cargo\registry\src\github.com-1ecc6299db9ec823\tower-balance-0.3.0\src\pool\mod.rs:418:37
    |
418 |                 return self.balance.poll_ready(cx);
    |                                     ^^^^^^^^^^ multiple `poll_ready` found
    |
note: candidate #1 is defined in an impl of the trait `tower_service::Service` for the type `p2c::service::Balance<_, _>`
   --> C:\Users\Steven Chm\.cargo\registry\src\github.com-1ecc6299db9ec823\tower-balance-0.3.0\src\p2c\service.rs:234:5
    |
234 |     fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: candidate #2 is defined in an impl of the trait `tower_make::make_service::MakeService` for the type `_`
help: disambiguate the method call for candidate #1
    |
418 |                 return tower_service::Service::poll_ready(&mut self.balance, cx);
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the method call for candidate #2
    |
418 |                 return tower_make::make_service::MakeService::poll_ready(&mut self.balance, cx);
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0034`.
error: could not compile `tower-balance`.

currently I fix it in local library, in case anyone who get same issue
tower-balance-0.3.0\src\pool\mod.rs:419:37

return tower_service::Service::poll_ready(&mut self.balance, cx);

tower-balance-0.3.0\src\pool\mod.rs:373:47

 if let Poll::Ready(()) = tower_service::Service::poll_ready(&mut self.balance, cx)? {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions