Skip to content

"Extract struct from enum variant" drops code comments and attributes of members #6730

@regexident

Description

@regexident

The "Extract struct from enum variant" VSCode refactor drops

  • comments
  • doc comments
  • attributes

Before:

pub enum Foo {
    Bar,
    Baz {
        // a comment
        /// a doc comment
        #[an_attribute]
        blee: bool
    }
}

After:

pub struct Baz{ pub blee: bool }

pub enum Foo {
    Bar,
    Baz(Baz)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-assistsS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions