Skip to content

Import/qualify trait Deref suggesting lazy_static::__Deref instead of std::ops::Deref #9197

Closed
@ThePuzzlemaker

Description

@ThePuzzlemaker

The code action to import/qualify a trait suggests lazy_static::__Deref instead of std::ops::Deref for just the name Deref.

To reproduce:

  • Add lazy_static v1.4.0 to the Cargo.toml (Not sure if this happens on other versions)
  • Create an impl block impl Deref for Foo.
  • Press alt-period or whatever code action shortcut is set up while the cursor is over the Deref in the impl Deref for Foo block.
  • lazy_static::__Deref is suggested instead of std::ops::Deref.

image

Information:
IDE: VSCode
Plugin: matklad.rust-analyzer v0.2.621
rust-analyzer version: rust-analyzer 28e32fe 2021-05-31 stable
Rust: 1.52.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-assistsA-completionautocompletionS-unactionableIssue requires feedback, design decisions or is blocked on other work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions