Skip to content

Commit c9e4798

Browse files
committed
Prefer add mod declaration to lib.rs over file.rs in UnlinkedFile fix
1 parent 77a447d commit c9e4798

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide/src/diagnostics/unlinked_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl DiagnosticWithFix for UnlinkedFile {
6363
// - `$dir.rs` in the parent folder, where `$dir` is the directory containing `self.file_id`
6464
let parent = our_path.parent()?;
6565
let mut paths =
66-
vec![parent.join("mod.rs")?, parent.join("main.rs")?, parent.join("lib.rs")?];
66+
vec![parent.join("mod.rs")?, parent.join("lib.rs")?, parent.join("main.rs")?];
6767

6868
// `submod/bla.rs` -> `submod.rs`
6969
if let Some(newmod) = (|| {

0 commit comments

Comments
 (0)