Skip to content

Racer shouldn't need type annotations to understand enum variants #785

@TedDriggs

Description

@TedDriggs

Repro code:

fn foo() {
    let bar = Some("Hello");
    bar.unwrap_or_d~efault();
}

Expected: Completion at the cursor should find unwrap_or_default
Observed: Completion finds nothing, because it "can't find the type of an EnumVariant"

The least invasive fix seems to be identifying the call to the enum variant and resolving its parent enum type.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions