Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/runnables.rs')
| -rw-r--r-- | crates/ide/src/runnables.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/ide/src/runnables.rs b/crates/ide/src/runnables.rs index 00b60a3902..21130e0607 100644 --- a/crates/ide/src/runnables.rs +++ b/crates/ide/src/runnables.rs @@ -237,8 +237,7 @@ fn find_related_tests( .map(|f| hir::InFile::new(sema.hir_file_for(f.syntax()), f)); for fn_def in functions { - // #[test/bench] expands to just the item causing us to lose the attribute, so recover them by going out of the attribute - let InFile { value: fn_def, .. } = &fn_def.map_out_of_test_attr(sema.db); + let InFile { value: fn_def, .. } = &fn_def; if let Some(runnable) = as_test_runnable(sema, fn_def) { // direct test tests.insert(runnable); @@ -294,8 +293,7 @@ fn parent_test_module(sema: &Semantics<RootDatabase>, fn_def: &ast::Fn) -> Optio } pub(crate) fn runnable_fn(sema: &Semantics<RootDatabase>, def: hir::Function) -> Option<Runnable> { - // #[test/bench] expands to just the item causing us to lose the attribute, so recover them by going out of the attribute - let func = def.source(sema.db)?.map_out_of_test_attr(sema.db); + let func = def.source(sema.db)?; let name_string = def.name(sema.db).to_string(); let root = def.module(sema.db).krate().root_module(sema.db); @@ -504,8 +502,6 @@ fn has_test_function_or_multiple_test_submodules( match item { hir::ModuleDef::Function(f) => { if let Some(it) = f.source(sema.db) { - // #[test/bench] expands to just the item causing us to lose the attribute, so recover them by going out of the attribute - let it = it.map_out_of_test_attr(sema.db); if test_related_attribute(&it.value).is_some() { return true; } |