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

futures-util-preview doesn't compile on the recent nightly #1350

Closed
tirr-c opened this issue Nov 26, 2018 · 4 comments
Closed

futures-util-preview doesn't compile on the recent nightly #1350

tirr-c opened this issue Nov 26, 2018 · 4 comments

Comments

@tirr-c
Copy link

tirr-c commented Nov 26, 2018

It suddenly complains about Pins, maybe the upstream API has changed.

error[E0277]: the size for values of type `<&mut future::maybe_done::MaybeDone<Fut> as std::ops::Deref>::Target` cannot be known at compilation time
   --> futures-util/src/future/maybe_done.rs:110:9
    |
110 |         Pin::set(self, MaybeDone::Done(res));
    |         ^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `std::marker::Sized` is not implemented for `<&mut future::maybe_done::MaybeDone<Fut> as std::ops::Deref>::Target`
    = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
    = help: consider adding a `where <&mut future::maybe_done::MaybeDone<Fut> as std::ops::Deref>::Target: std::marker::Sized` bound
    = note: all function arguments must have a statically known size
    = help: unsized locals are gated as an unstable feature

(...)

error: aborting due to 38 previous errors
$ rustc -V
rustc 1.32.0-nightly (6acbb5b65 2018-11-25)

It was okay until edaac35d6 2018-11-24.

@aturon
Copy link
Member

aturon commented Nov 26, 2018

cc @cramertj @withoutboats

@Nemo157
Copy link
Member

Nemo157 commented Nov 26, 2018

Seems like a rustc inference issue, it should know that <typeof(self)>::Deref = Self here, and Self: Sized.

Here's all the commits to rust-lang/rust between those versions. I think there's some tool that can pull bors' try builds into rustup to be able to check the individual PRs?

@withoutboats
Copy link

This is a regression in rustc. Filed an issue at rust-lang/rust#56237. Closing the issue on this repo.

@cramertj
Copy link
Member

#1351 contains a workaround.

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

5 participants