Skip to content

Types not inferred for some arguments in function call hint e.g. Option<_> #5843

Closed
@jamesmcm

Description

@jamesmcm

Hi,

See this example: https://i.imgur.com/ISVhf2B.png

This is with rust-analyzer built from the master branch of this repo, and using coc-rust-analyzer in neovim.

The full function signature is:

fn send_email(
    recipient: &str,
    subject: &str,
    plain_body: &str,
    html_body: Option<&str>,
    attachment: Option<Attachment>,
    ses_client: &SesClient,
    rt: &mut tokio::runtime::Runtime,
) -> Result<()> 

defined in the same source file.

Where Result there is anyhow::Result

It fails to show the types for both Option<_> cases.

I'd be happy to contribute but I'm not sure where to start, even for just getting debug info when using coc and neovim on Linux.

Looking at the code, it seems the relevant part might be the lowering to LSP types in hir_ty/src/lower.rs.

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