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

Expected 0 arguments, found 1 when parallel folding/reducing ndarray::Array2 #6540

Open
0x7CFE opened this issue Nov 13, 2020 · 2 comments
Open
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug S-unactionable Issue requires feedback, design decisions or is blocked on other work

Comments

@0x7CFE
Copy link

0x7CFE commented Nov 13, 2020

rust-analyzer version: unreleased (9beec7c)

The following code is successfully compiled by rustc but fails in RA. Looks like a regression since it was working several weeks ago.

Error message:
image

The same code but as a text:

fn test() {
    let array = ndarray::Array2::<f32>::from_elem((10, 10), 0.);
    let init = array.first().cloned().unwrap();

    let (min, max) = ndarray::Zip::from(array.view())
        .into_par_iter()
        .fold(||(init, init), |(min, max), (energy,)| {
            (energy.min(min), energy.max(max))
        })
        .reduce(||(init, init), |(amin, amax), (bmin, bmax)| {
            (amin.min(bmin), amax.max(bmax))
        });
}
@0x8f701
Copy link

0x8f701 commented Nov 13, 2020

#6390 #5502 is it the same thing?

@flodiebold
Copy link
Member

Not necessarily. These are all just symptoms of unresolved types or method resolution problems, which can have many reasons.

@flodiebold flodiebold added the A-ty type system / type inference / traits / method resolution label Nov 13, 2020
@flodiebold flodiebold added the S-unactionable Issue requires feedback, design decisions or is blocked on other work label Dec 21, 2020
@flodiebold flodiebold added the C-bug Category: bug label Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug S-unactionable Issue requires feedback, design decisions or is blocked on other work
Projects
None yet
Development

No branches or pull requests

3 participants