Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

No completion / hover info when function contains generic Fn(Once) #1611

@hasezoey

Description

@hasezoey

(similar to #674 (comment))
i dont know if this is a duplicate or so, but i tried to search for something similar but didnt find anything

The Problem

When hovering or just autocompletion, it dosnt show something like unwrap_or_else but something like unwrap_or, but when i change pub fn unwrap_or_else<F: FnOnce() -> T>(self, f: F)(rust source code) to something like pub fn unwrap_or_else<F: String>(self, f: F) (removing the FnOnce() -> T), it magicly shows autocompletion and hover info

i know for sure that it is not happening on all generics, but only on those who include FnOnce
and from what i could test is, when defining the function in the same file it needs to get info from, it just works

Using

VSCode: 1.41.1
Rust (rls) [rust-lang.rust]: 0.7.0
toolchain: nightly
(project compiled in stable, but shouldnt affect rls autocompletion (compiled in different terminal))
OS: Linux Mint 19.3
config:

{
	"rust-client.updateOnStartup": true,
	"rust.unstable_features": true,
	"rust-client.channel": "nightly",
}

usage / reproduction

fn main() {
 let Some(()).unwrap_ // autocompletion will only show "unwrap_or", "unwrap_none", "unwrap_or_default"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions