Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5766: INSP: attach module without a parent to a parent module in AttachFileToModuleFix r=mchernyavsky a=Kobzol #5490 added a quick fix to attach a file to a nearby module. However, for `mod.rs` files it offered only crate root files (`lib.rs`, `main.rs`) and not parent modules. So in this case: ```rust //- foo/mod.rs /* nothing to see here */ //- foo/bar/mod.rs /* caret*/ ``` The quick fix wasn't offered at `/*caret*/`. After this PR, the quick fix is offered and the example code is transformed into this: ```rust //- foo/mod.rs mod bar; //- foo/bar/mod.rs ``` Co-authored-by: Jakub Beránek <berykubik@gmail.com>
- Loading branch information
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters