tower-hyper icon indicating copy to clipboard operation
tower-hyper copied to clipboard

Failed to compile with: error[E0034]: multiple applicable items in scope

Open krampenschiesser opened this issue 7 years ago • 3 comments

Tested with stable rustc 1.34.2 nightly rustc 1.36.0-nightly

error[E0034]: multiple applicable items in scope
  --> src\body.rs:65:15
   |
65 |         inner.poll_data::<hyper::Body>()
   |               ^^^^^^^^^ multiple `poll_data` found
   |
   = note: candidate #1 is defined in an impl of the trait `hyper::body::payload::Payload` for the type `hyper::body::body::Body`
   = note: candidate #2 is defined in an impl of the trait `http_body::Body` for the type `hyper::body::body::Body`

krampenschiesser avatar May 17 '19 15:05 krampenschiesser

This seems to relate to #31 and a very recent PR in hyper https://github.com/hyperium/hyper/pull/1811

Hyper and this libray will both depend on a small trait provided here: https://github.com/hyperium/http-body and it seems like a nice change. Shame that it breaks things right now, though.

It looks like it's a change that will touch a lot of code in this library. It's unclear to me what exactly needs to change, though, since there may be a vision of how this change fits into the rest of the tower/rust http ecosystem.

anxiousmodernman avatar May 18 '19 15:05 anxiousmodernman

Sorry about the breakage! The Body in this crate is a newtype that we created to get around coherence issues/orphan rules. To unbreak builds, you’d want to remove all mentions of this crate’s body and instead rely on hyperium/http-body. We’re hoping to do this next week, but today and Sunday, I’m pet sitting and Lucio is moving apartments. If you send a PR to resolve this, I’ll happily review it.

davidbarsky avatar May 18 '19 18:05 davidbarsky

Hi all! this should be fixed in #34

LucioFranco avatar May 21 '19 14:05 LucioFranco