We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Compiling some futures related code fails with: error: reached the recursion limit during monomorphization (selection ambiguity)
error: reached the recursion limit during monomorphization (selection ambiguity)
extern crate futures; // 0.1.6 extern crate futures_cpupool; // 0.1.2 use futures::Future; use futures_cpupool::CpuPool; const MAX: usize = 10; fn work(n: u32) -> Result<u32, ()> { ::std::thread::sleep_ms(n * 2); Ok(n) } fn fold_b(a: u64, b: u32) -> u64 { ::std::thread::sleep_ms(b); a + b as u64 } fn main() { let pool = CpuPool::new_num_cpus(); let data = (0..MAX).rev().collect::<Vec<_>>(); let a = { let workers = data.clone() .into_iter() .map(|d| pool.spawn_fn(move || work(d as u32))); ::futures::collect(workers).wait().unwrap().into_iter().fold(0, fold_b) }; }
rustc --version rustc 1.15.0-nightly (d9bdc636d 2016-11-24)
The text was updated successfully, but these errors were encountered:
It seems that this was introduced between version 0.1.3 and version 0.1.4.
Sorry, something went wrong.
I've opened rust-lang/rust#38033 to track this
This particular instance of the error appears to have been eliminated, so I think it makes sense to close this issue.
I've found another instance of this error message and reported it as #367.
Oops forgot to close this with @dwrensha's last comment.
No branches or pull requests
Compiling some futures related code fails with:
error: reached the recursion limit during monomorphization (selection ambiguity)
rustc --version rustc 1.15.0-nightly (d9bdc636d 2016-11-24)
The text was updated successfully, but these errors were encountered: