Skip to content

Rust 1.46.0 - type-length limit while instantiating future::Ready #2202

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

Closed
dessalines opened this issue Aug 28, 2020 · 2 comments
Closed

Rust 1.46.0 - type-length limit while instantiating future::Ready #2202

dessalines opened this issue Aug 28, 2020 · 2 comments

Comments

@dessalines
Copy link

dessalines commented Aug 28, 2020

I'm getting this error on futures-util since upgrading to rust 1.46.0 :

error: reached the type-length limit while instantiating `<futures::future::Ready<std::res...y>::new_service::{{closure}}#0]>`
   --> /home/xxx/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/future/future/mod.rs:142:5
    |
142 | /     fn map<U, F>(self, f: F) -> Map<Self, F>
143 | |     where
144 | |         F: FnOnce(Self::Output) -> U,
145 | |         Self: Sized,
146 | |     {
147 | |         assert_future::<U, _>(Map::new(self, f))
148 | |     }
    | |_____^
    |
    = note: consider adding a `#![type_length_limit="1471465"]` attribute to your crate

error: aborting due to previous error
@taiki-e
Copy link
Member

taiki-e commented Aug 28, 2020

Can you provide code that could reproduce this problem? I can't reproduce this, but in any case, if you can compile with the previous version of rustc, I think this is not a problem on futures-rs side, but a regression of rustc.

possibly related: rust-lang/rust#75992, rust-lang/rust#72408

@dessalines
Copy link
Author

I'll close in that case, yes it does compile with previous versions of rustc. Its project with a large codebase, lemmy, so I don't know how to replicate it outside of that.

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

2 participants