Skip to content

Builtin primitive types are not abbreviated in, say, "Implement missing members" assist #3977

@Vlad-Shcherbina

Description

@Vlad-Shcherbina

rust-analyzer version: 2020-04-13 (c388130)
To reproduce, invoke "Implement missing members" assist on the following program:

trait Foo {
    fn f(x: u32);
}
struct S;
impl Foo for S {}

Expected result:

impl Foo for S {
    fn f(x: u32) { todo!() }
}

Actual result:

impl Foo for S {
    fn f(x: std::primitive::u32) { todo!() }
}

If I explicitly add the use std::primitive::u32 use declaration, the assist will work as expected. But this use declaration is already implied, so it should work without it too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-unknownIt's unclear if the issue is E-hard or E-easy without digging in

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions