Skip to content

Qualify path loses path segment #22281

@A4-Tacks

Description

@A4-Tacks

rust-analyzer version: rust-analyzer 0.4.2885-standalone

rustc version: rustc 1.97.0-nightly (36ba2c771 2026-04-23)

editor or extension: Vim

code snippet to reproduce:

mod ast { pub mod make { pub mod ext { pub fn foo() {} } } }
make::ext::foo$0

actual:

mod ast { pub mod make { pub mod ext { pub fn foo() {} } } }
ast::make::foo

expect:

mod ast { pub mod make { pub mod ext { pub fn foo() {} } } }
ast::make::ext::foo

other case (correct):

mod ast { pub mod make { pub mod ext { pub fn foo() {} } } }
make::ext$0::foo

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions