@@ -3,7 +3,7 @@ use std::{fmt, sync::OnceLock};
33use arrayvec:: ArrayVec ;
44use ast:: HasName ;
55use cfg:: { CfgAtom , CfgExpr } ;
6- use hir:: { AsAssocItem , HasAttrs , HasCrate , HasSource , Semantics , Symbol , db :: HirDatabase , sym} ;
6+ use hir:: { AsAssocItem , HasAttrs , HasCrate , HasSource , Semantics , Symbol , sym} ;
77use ide_assists:: utils:: { has_test_related_attribute, test_related_attribute_syn} ;
88use ide_db:: impl_empty_upmap_from_ra_fixture;
99use ide_db:: {
@@ -55,7 +55,7 @@ impl fmt::Display for TestId {
5555#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
5656pub enum RunnableKind {
5757 TestMod { path : String } ,
58- Test { test_id : TestId , attr : TestAttr } ,
58+ Test { test_id : TestId } ,
5959 Bench { test_id : TestId } ,
6060 DocTest { test_id : TestId } ,
6161 Bin ,
@@ -334,8 +334,7 @@ pub(crate) fn runnable_fn(
334334 } ;
335335
336336 if def. is_test ( sema. db ) {
337- let attr = TestAttr :: from_fn ( sema. db , def) ;
338- RunnableKind :: Test { test_id : test_id ( ) , attr }
337+ RunnableKind :: Test { test_id : test_id ( ) }
339338 } else if def. is_bench ( sema. db ) {
340339 RunnableKind :: Bench { test_id : test_id ( ) }
341340 } else {
@@ -558,17 +557,6 @@ fn module_def_doctest(sema: &Semantics<'_, RootDatabase>, def: Definition) -> Op
558557 Some ( res)
559558}
560559
561- #[ derive( Debug , Copy , Clone , Hash , PartialEq , Eq ) ]
562- pub struct TestAttr {
563- pub ignore : bool ,
564- }
565-
566- impl TestAttr {
567- fn from_fn ( db : & dyn HirDatabase , fn_def : hir:: Function ) -> TestAttr {
568- TestAttr { ignore : fn_def. is_ignore ( db) }
569- }
570- }
571-
572560fn has_runnable_doc_test ( db : & RootDatabase , attrs : & hir:: AttrsWithOwner ) -> bool {
573561 const RUSTDOC_FENCES : [ & str ; 2 ] = [ "```" , "~~~" ] ;
574562 const RUSTDOC_CODE_BLOCK_ATTRIBUTES_RUNNABLE : & [ & str ] =
0 commit comments