@@ -246,7 +246,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
246
246
match kind {
247
247
CodeBlockKind :: Fenced ( ref lang) => {
248
248
let parse_result =
249
- LangString :: parse_without_check ( lang, self . check_error_codes , false ) ;
249
+ LangString :: parse_without_check ( lang, self . check_error_codes ) ;
250
250
if !parse_result. rust {
251
251
let added_classes = parse_result. added_classes ;
252
252
let lang_string = if let Some ( lang) = parse_result. unknown . first ( ) {
@@ -707,17 +707,15 @@ pub(crate) fn find_testable_code<T: doctest::DocTestVisitor>(
707
707
doc : & str ,
708
708
tests : & mut T ,
709
709
error_codes : ErrorCodes ,
710
- enable_per_target_ignores : bool ,
711
710
extra_info : Option < & ExtraInfo < ' _ > > ,
712
711
) {
713
- find_codes ( doc, tests, error_codes, enable_per_target_ignores , extra_info, false )
712
+ find_codes ( doc, tests, error_codes, extra_info, false )
714
713
}
715
714
716
715
pub ( crate ) fn find_codes < T : doctest:: DocTestVisitor > (
717
716
doc : & str ,
718
717
tests : & mut T ,
719
718
error_codes : ErrorCodes ,
720
- enable_per_target_ignores : bool ,
721
719
extra_info : Option < & ExtraInfo < ' _ > > ,
722
720
include_non_rust : bool ,
723
721
) {
@@ -733,12 +731,7 @@ pub(crate) fn find_codes<T: doctest::DocTestVisitor>(
733
731
if lang. is_empty ( ) {
734
732
Default :: default ( )
735
733
} else {
736
- LangString :: parse (
737
- lang,
738
- error_codes,
739
- enable_per_target_ignores,
740
- extra_info,
741
- )
734
+ LangString :: parse ( lang, error_codes, extra_info)
742
735
}
743
736
}
744
737
CodeBlockKind :: Indented => Default :: default ( ) ,
@@ -1162,18 +1155,13 @@ impl Default for LangString {
1162
1155
}
1163
1156
1164
1157
impl LangString {
1165
- fn parse_without_check (
1166
- string : & str ,
1167
- allow_error_code_check : ErrorCodes ,
1168
- enable_per_target_ignores : bool ,
1169
- ) -> Self {
1170
- Self :: parse ( string, allow_error_code_check, enable_per_target_ignores, None )
1158
+ fn parse_without_check ( string : & str , allow_error_code_check : ErrorCodes ) -> Self {
1159
+ Self :: parse ( string, allow_error_code_check, None )
1171
1160
}
1172
1161
1173
1162
fn parse (
1174
1163
string : & str ,
1175
1164
allow_error_code_check : ErrorCodes ,
1176
- enable_per_target_ignores : bool ,
1177
1165
extra : Option < & ExtraInfo < ' _ > > ,
1178
1166
) -> Self {
1179
1167
let allow_error_code_check = allow_error_code_check. as_bool ( ) ;
@@ -1200,11 +1188,8 @@ impl LangString {
1200
1188
data. ignore = Ignore :: All ;
1201
1189
seen_rust_tags = !seen_other_tags;
1202
1190
}
1203
- LangStringToken :: LangToken ( x)
1204
- if let Some ( ignore) = x. strip_prefix ( "ignore-" )
1205
- && enable_per_target_ignores =>
1206
- {
1207
- ignores. push ( ignore. to_owned ( ) ) ;
1191
+ LangStringToken :: LangToken ( x) if x. starts_with ( "ignore-" ) => {
1192
+ ignores. push ( x. trim_start_matches ( "ignore-" ) . to_owned ( ) ) ;
1208
1193
seen_rust_tags = !seen_other_tags;
1209
1194
}
1210
1195
LangStringToken :: LangToken ( "rust" ) => {
@@ -1966,7 +1951,7 @@ pub(crate) fn rust_code_blocks(md: &str, extra_info: &ExtraInfo<'_>) -> Vec<Rust
1966
1951
let lang_string = if syntax. is_empty ( ) {
1967
1952
Default :: default ( )
1968
1953
} else {
1969
- LangString :: parse ( syntax, ErrorCodes :: Yes , false , Some ( extra_info) )
1954
+ LangString :: parse ( syntax, ErrorCodes :: Yes , Some ( extra_info) )
1970
1955
} ;
1971
1956
if !lang_string. rust {
1972
1957
continue ;
0 commit comments