Skip to content

Merge imports with self and existing nested items gets rid of the latter #11466

@DropDemBits

Description

@DropDemBits

rust-analyzer version: rust-analyzer version: ba33054 2022-02-07 stable

rustc version: rustc 1.58.1 (db9d1b20b 2022-01-20)

Initial code:

use nest::p::{self, B};
use nest::{
    p::{A, C},
    q,
};

pub mod nest {
    pub mod p {
        pub struct A;
        pub struct B;
        pub struct C;
    }

    pub mod q {}
}

Expected:

use nest::{
    p::{self, B, A, C},
    q,
};

Actual:

use nest::{
    p::{self, B},
    q,
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-idegeneral IDE featuresC-bugCategory: bugS-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