editor or extension: VSCode; rust-analyzer v0.3.1940
relevant settings: None applicable
code snippet to reproduce:
In src/main.rs:
#[path="parser/__mod.rs"]
mod parser;
fn main() {}
In src/parser/__mod.rs:
mod expr {};
Place the cursor on expr and invoke the "Extract module to file" assist.
Expected behavior:
The line in __mod.rs becomes mod expr;, and a new empty file is created at parser/expr.rs.
Actual behavior:
The line in __mod.rs becomes mod expr;, and a new empty file is created at parser/parser/expr.rs (where it will not be recognized as part of the workspace).
rust-analyzer version: 0.3.1940-standalone (f216be4a0 2024-04-27)
rustc version: rustc 1.79.0-nightly (0d8b3346a 2024-04-14)
editor or extension: VSCode; rust-analyzer v0.3.1940
relevant settings: None applicable
code snippet to reproduce: In
src/main.rs
:In
src/parser/__mod.rs
:Place the cursor on
expr
and invoke the "Extract module to file" assist.Expected behavior: The line in
__mod.rs
becomesmod expr;
, and a new empty file is created atparser/expr.rs
.Actual behavior: The line in
__mod.rs
becomesmod expr;
, and a new empty file is created atparser/parser/expr.rs
(where it will not be recognized as part of the workspace).