From c9e479870ba34a04ed91fb8055721b4c3d00a26c Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 27 Mar 2021 22:39:39 +0100 Subject: Prefer add `mod` declaration to lib.rs over file.rs in UnlinkedFile fix --- crates/ide/src/diagnostics/unlinked_file.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ide/src') diff --git a/crates/ide/src/diagnostics/unlinked_file.rs b/crates/ide/src/diagnostics/unlinked_file.rs index 019b0b440..e174fb767 100644 --- a/crates/ide/src/diagnostics/unlinked_file.rs +++ b/crates/ide/src/diagnostics/unlinked_file.rs @@ -63,7 +63,7 @@ impl DiagnosticWithFix for UnlinkedFile { // - `$dir.rs` in the parent folder, where `$dir` is the directory containing `self.file_id` let parent = our_path.parent()?; let mut paths = - vec![parent.join("mod.rs")?, parent.join("main.rs")?, parent.join("lib.rs")?]; + vec![parent.join("mod.rs")?, parent.join("lib.rs")?, parent.join("main.rs")?]; // `submod/bla.rs` -> `submod.rs` if let Some(newmod) = (|| { -- cgit v1.2.3