question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Completion issue: no method proposed sometimes (e.g. in the crate rayon)

See original GitHub issue

Environment

  • IntelliJ Rust plugin version: 0.2.106.2135-192
  • Rust toolchain version: stable-x86_64-pc-windows-gnu rustc 1.38.0 (625451e37 2019-09-23)
  • IDE name and version: CLion 2019.2.3
  • Operating system: Windows 10 Pro x64 1906

Problem description

The autocompletion sometimes does not yield any result. This example demonstrates a concrete scenario using the crate rayon. The function par_iter() does not propose any suggestion, while the code is working. The screenshot below details the issue:

issue

Steps to reproduce

Clone https://ZenLulz@bitbucket.org/ZenLulz/rust-no-autocompletion-rayon.git. Open the project in the environment defined above. Write a dot (.) after the par_iter() function, in main.rs. Notice that no autocompletion is given.

Sample code:

use rayon::prelude::*;
fn main() {
    let v = vec![1,2,3];
    let x = v.par_iter()./*caret*/ // no completion for `map`
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
Alfred-Mountfieldcommented, Mar 16, 2021

This problem also affects other parts of intellisense, any of the contents of the closures within the operators like map, for_each, etc. after the par_iter aren’t picked up, meaning refactoring misses them, and things like ctrl+click fail to find usages of functions.

2reactions
AndreKRcommented, Jan 3, 2021

@cgburgess The first step would be to set up the plugin for development, as described in CONTRIBUTING.md. Check out ARCHITECTURE.md as well.

The next step I guess would be poking around with the debugger, seeing how normally types are represented and then checking what the rayon types are missing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

struggling with trait implementations--to work in my rust-bio ...
In fact, it looks like the bio crate doesn't include implementations of rayon traits for any of its types, or even depend on...
Read more >
Parallel stream processing with Rayon | More Stina Blog!
Most Rust programmers have heard of Rayon, a crate that makes it almost magically easy to introduce parallelism to a program.
Read more >
mod.rs - source - Docs.rs
[r]: https://github.com/rayon-rs/rayon/blob/master/src/iter/plumbing/README.md use crate::join_context; use super::IndexedParallelIterator; use std::cmp; ...
Read more >
What are your must install crates when starting a new project?
73 votes, 48 comments. The ones that you just can't live without. I'll start, color-eyre, once_cell and cargo-watch (not a per project crate...
Read more >
Multithreading in Rust using Crates [Tutorial] - Packt Hub
The crates.io ecosystem in Rust can be used for more approaches to ... since no new values are being added, so the try_pop()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found