mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
Print runnable kind on assertion failure for better debuggability
This commit is contained in:
parent
f640f2dbb4
commit
0b8e145641
@ -105,10 +105,12 @@ pub(crate) fn runnables(db: &RootDatabase, file_id: FileId) -> Vec<Runnable> {
|
||||
|
||||
let mut res = Vec::new();
|
||||
let mut add_opt = |runnable: Option<Runnable>| {
|
||||
if let Some(runnable) = runnable.filter(|r| {
|
||||
if let Some(runnable) = runnable.filter(|runnable| {
|
||||
always!(
|
||||
r.nav.file_id == file_id,
|
||||
"tried adding a runnable pointing to a different file"
|
||||
runnable.nav.file_id == file_id,
|
||||
"tried adding a runnable pointing to a different file: {:?} for {:?}",
|
||||
runnable.kind,
|
||||
file_id
|
||||
)
|
||||
}) {
|
||||
res.push(runnable);
|
||||
|
Loading…
Reference in New Issue
Block a user