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

Conditional methods don't get suggested by Rust Analyzer #17189

Open
nvzqz opened this issue May 5, 2024 · 1 comment
Open

Conditional methods don't get suggested by Rust Analyzer #17189

nvzqz opened this issue May 5, 2024 · 1 comment
Labels
A-completion autocompletion C-bug Category: bug

Comments

@nvzqz
Copy link

nvzqz commented May 5, 2024

rust-analyzer version: 0.3.1940-standalone (f216be4 2024-04-27)

rustc version:

rustc -Vv
rustc 1.77.2 (25ef9e3d8 2024-04-09)
binary: rustc
commit-hash: 25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04
commit-date: 2024-04-09
host: aarch64-apple-darwin
release: 1.77.2
LLVM version: 17.0.6

editor or extension: VSCode

code snippet to reproduce:

#[divan::bench]
fn my_benchmark(bencher: divan::Bencher) {
    bencher.bench(|| {/* ... */});
}

It used to be that methods like bench or with_inputs + bench_values would be suggested by Rust Analyzer. This no longer works.

Bencher uses a similar pattern to:

struct Container<A>(A);

impl<A: Fn()> Container<A> {
    fn invoke(&self) {
        (self.0)()
    }
}
@nvzqz nvzqz added the C-bug Category: bug label May 5, 2024
@Veykril
Copy link
Member

Veykril commented May 5, 2024

cc @davidbarsky I assume that this might be caused by your changes

@Veykril Veykril added the A-completion autocompletion label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion autocompletion C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants