@@ -8,7 +8,7 @@ use crate::clean;
8
8
use crate :: clean:: * ;
9
9
use crate :: core:: DocContext ;
10
10
use crate :: fold:: DocFolder ;
11
- use crate :: html:: markdown:: { find_testable_code, ErrorCodes , LangString } ;
11
+ use crate :: html:: markdown:: { find_testable_code, ErrorCodes , Ignore , LangString } ;
12
12
use rustc_session:: lint;
13
13
14
14
pub const CHECK_PRIVATE_ITEMS_DOC_TESTS : Pass = Pass {
@@ -48,15 +48,11 @@ pub(crate) struct Tests {
48
48
pub ( crate ) found_tests : usize ,
49
49
}
50
50
51
- impl Tests {
52
- pub ( crate ) fn new ( ) -> Tests {
53
- Tests { found_tests : 0 }
54
- }
55
- }
56
-
57
51
impl crate :: doctest:: Tester for Tests {
58
- fn add_test ( & mut self , _: String , _: LangString , _: usize ) {
59
- self . found_tests += 1 ;
52
+ fn add_test ( & mut self , _: String , config : LangString , _: usize ) {
53
+ if config. rust && config. ignore == Ignore :: None {
54
+ self . found_tests += 1 ;
55
+ }
60
56
}
61
57
}
62
58
@@ -85,7 +81,7 @@ pub fn look_for_tests<'tcx>(cx: &DocContext<'tcx>, dox: &str, item: &Item) {
85
81
}
86
82
} ;
87
83
88
- let mut tests = Tests :: new ( ) ;
84
+ let mut tests = Tests { found_tests : 0 } ;
89
85
90
86
find_testable_code ( & dox, & mut tests, ErrorCodes :: No , false , None ) ;
91
87
0 commit comments