Skip to content

Commit fffa603

Browse files
committed
flycheck: better logging
1 parent 9f6b8ec commit fffa603

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

crates/flycheck/src/lib.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ impl FlycheckActor {
239239
Ok(cargo_handle) => {
240240
tracing::debug!(
241241
command = ?command_string,
242-
"did restart flycheck"
242+
"did restart flycheck"
243243
);
244244
self.cargo_handle = Some(cargo_handle);
245245
self.report_progress(Progress::DidStart);
@@ -384,8 +384,19 @@ impl FlycheckActor {
384384
let mut args = args.clone();
385385
args[i] = saved_file.to_string();
386386
(cmd, args)
387-
},
388-
_ => unreachable!("this code should not be reachable. An invariant inside of rust-analyzer has been broken.")
387+
}
388+
(None, Some(saved_file)) => {
389+
dbg!("no index, saved file included: {}", &saved_file);
390+
unreachable!()
391+
}
392+
(Some(i), None) => {
393+
dbg!("index, no saved file included: {}", &i);
394+
unreachable!()
395+
}
396+
(None, None) => {
397+
dbg!("No index or no saved file included");
398+
unreachable!()
399+
}
389400
}
390401
} else {
391402
(cmd, args.clone())

0 commit comments

Comments
 (0)