Skip to content

RA does not properly handle raw idents in module names #13884

@Dante-Broggi

Description

@Dante-Broggi

RA does not properly handle raw idents in module names:
given: src/lib.rs

pub mod r#type {
    pub mod subtype;
}

cargo looks for the file src/type/subtype.rs
RA looks for the file src/r#type/subtype.rs

rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P)
rust-analyzer version: 0.3.1348-standalone (643bc02 2023-01-01)
rustc version: (eg. output of rustc -V)
rustc 1.65.0-nightly (d394408 2022-08-07)
cargo 1.65.0-nightly (4fd148c47 2022-08-03)
relevant settings: (eg. client settings, or environment variables like CARGO, RUSTUP_HOME or CARGO_HOME)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-nameresname, path and module resolutionC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions