Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo doc fails #153

Closed
goodSyntax808 opened this issue Jan 27, 2020 · 11 comments
Closed

cargo doc fails #153

goodSyntax808 opened this issue Jan 27, 2020 · 11 comments

Comments

@goodSyntax808
Copy link

goodSyntax808 commented Jan 27, 2020

Trying to build the docs from the root of this repository fails on macOS 10.15.2 with rustc 1.42.0-nightly (698fcd38f 2020-01-26)

I receive the following error:

error[E0277]: the trait bound `(): std::future::Future` is not satisfied
  --> noria/src/controller.rs:65:5
   |
65 |     type Future = impl Future<Output = Result<Self::Response, Self::Error>> + Send;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `()`
   |
   = note: the return type of a function must have a statically known size

error[E0277]: the trait bound `(): std::future::Future` is not satisfied
  --> noria/src/view.rs:38:5
   |
38 | /     type Future = impl Future<
39 | |         Output = Result<multiplex::MultiplexTransport<Transport, Tagger>, tokio::io::Error>,
40 | |     >;
   | |______^ the trait `std::future::Future` is not implemented for `()`
   |
   = note: the return type of a function must have a statically known size

error[E0277]: the trait bound `(): std::future::Future` is not satisfied
  --> noria/src/table.rs:42:5
   |
42 | /     type Future = impl Future<
43 | |         Output = Result<multiplex::MultiplexTransport<Transport, Tagger>, tokio::io::Error>,
44 | |     >;
   | |______^ the trait `std::future::Future` is not implemented for `()`
   |
   = note: the return type of a function must have a statically known size

error[E0277]: the trait bound `(): std::future::Future` is not satisfied
   --> noria/src/controller.rs:179:1
    |
179 | type RpcFuture<A, R> = impl Future<Output = Result<R, failure::Error>>;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `()`
    |
    = note: the return type of a function must have a statically known size

error[E0277]: the trait bound `(): std::future::Future` is not satisfied
   --> noria/src/table.rs:235:5
    |
235 |     type Future = impl Future<Output = Result<Tagged<()>, TableError>> + Send;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `()`
    |
    = note: the return type of a function must have a statically known size

error[E0277]: the trait bound `(): std::future::Future` is not satisfied
   --> noria/src/view.rs:201:5
    |
201 |     type Future = impl Future<Output = Result<Vec<Datas>, ViewError>> + Send;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `()`
    |
    = note: the return type of a function must have a statically known size

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0277`.
error: Could not document `noria`.

@jonhoo
Copy link
Contributor

jonhoo commented Jan 27, 2020

That's fascinating... cargo check and cargo test both work fine. I have absolutely no idea why it'd fail under cargo doc... Sort of sounds like a cargo bug. Any suggestions?

@goodSyntax808
Copy link
Author

No idea. My friend tried it on Manjaro and it fails with the same error. cargo check and cargo test work for me so yes, definitely weird.

@intendednull
Copy link

Failing for me too on arch 5.5.3 w/ rustc 1.43.0-nightly (58b834344 2020-02-05). Can confirm everything else works.

@jonhoo
Copy link
Contributor

jonhoo commented Feb 17, 2020

Ah, this is rust-lang/rust#65863, which also prevents the noria crates from working on docs.rs 😢

@anandijain
Copy link

this may be a different bug, but on cargo doc --open, I get:

The binary 'vote' is specified by packages 'noria-applications v0.3.0' and 'noria-orchestration v0.3.0' but can be documented only once. Consider renaming or marking one of the targets as 'doc = false'.

it's not exactly clear where I should mark the target doc=false. thanks!

@jonhoo
Copy link
Contributor

jonhoo commented Apr 16, 2020

Ah, interesting... That's super weird. We can really mark both of those as doc = false. In the meantime, I think you'll want cargo doc --lib -p noria.

jonhoo added a commit that referenced this issue Apr 16, 2020
@jonhoo
Copy link
Contributor

jonhoo commented Apr 16, 2020

I pushed a commit to master now that should take care of it!

@anandijain
Copy link

Thanks!

@anandijain
Copy link

anandijain commented Apr 16, 2020

after git pulling, running cargo doc --lib -p noria and cargo doc --open now gives:

the trait `core::future::future::Future` is not implemented for `()`... 
error: Could not document `tokio-tower`.

So unlike the original issue, the error is on tokio-tower not noria.

@jonhoo
Copy link
Contributor

jonhoo commented Apr 16, 2020

Yup, although it's still the same underlying issue :)

@jonhoo
Copy link
Contributor

jonhoo commented Jun 6, 2020

This should now work (there are also now docs on docs.rs!), though you'll have to comment out the line indicate in the root-level Cargo.toml (or you'll hit rust-lang/rust#73061).

@jonhoo jonhoo closed this as completed Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants