Skip to content

Commit 021f677

Browse files
bors[bot]Veykril
andauthored
Merge #9462
9462: minor: Print runnable kind on assertion failure for better debuggability r=Veykril a=Veykril We are somehow hitting this when looking at `crates\ide_db\src\lib.rs` and I don't see how. bors r+ Co-authored-by: Lukas Wirth <[email protected]>
2 parents cd7277e + 0b8e145 commit 021f677

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/ide/src/runnables.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,12 @@ pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec<Runnable> {
105105

106106
let mut res = Vec::new();
107107
let mut add_opt = |runnable: Option<Runnable>| {
108-
if let Some(runnable) = runnable.filter(|r| {
108+
if let Some(runnable) = runnable.filter(|runnable| {
109109
always!(
110-
r.nav.file_id == file_id,
111-
"tried adding a runnable pointing to a different file"
110+
runnable.nav.file_id == file_id,
111+
"tried adding a runnable pointing to a different file: {:?} for {:?}",
112+
runnable.kind,
113+
file_id
112114
)
113115
}) {
114116
res.push(runnable);

0 commit comments

Comments
 (0)