Skip to content

Implement missing members assist fills in consts with default value #13292

Closed
@crumblingstatue

Description

@crumblingstatue
trait Foo {
    const C: i32 = 42;

    fn missing();
}

struct Bar;

impl Foo for Bar {
    
}

The assist generates the following:

impl Foo for Bar {
    const C: i32 = 42; // Unnecessary, there is already a default

    fn missing() {
        todo!()
    }
}

rust-analyzer version: rust-analyzer version: 0.3.1212-standalone

rustc version: rustc 1.66.0-nightly (4a1467723 2022-09-23)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions