This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -779,6 +779,7 @@ impl CreateRunnableDoctests {
779
779
let is_standalone = !self . can_merge_doctests
780
780
|| scraped_test. langstr . compile_fail
781
781
|| scraped_test. langstr . test_harness
782
+ || scraped_test. langstr . standalone
782
783
|| self . rustdoc_options . nocapture
783
784
|| self . rustdoc_options . test_args . iter ( ) . any ( |arg| arg == "--show-output" )
784
785
|| doctest. crate_attrs . contains ( "#![no_std]" ) ;
Original file line number Diff line number Diff line change @@ -868,6 +868,7 @@ pub(crate) struct LangString {
868
868
pub ( crate ) rust : bool ,
869
869
pub ( crate ) test_harness : bool ,
870
870
pub ( crate ) compile_fail : bool ,
871
+ pub ( crate ) standalone : bool ,
871
872
pub ( crate ) error_codes : Vec < String > ,
872
873
pub ( crate ) edition : Option < Edition > ,
873
874
pub ( crate ) added_classes : Vec < String > ,
@@ -1179,6 +1180,7 @@ impl Default for LangString {
1179
1180
rust : true ,
1180
1181
test_harness : false ,
1181
1182
compile_fail : false ,
1183
+ standalone : false ,
1182
1184
error_codes : Vec :: new ( ) ,
1183
1185
edition : None ,
1184
1186
added_classes : Vec :: new ( ) ,
@@ -1248,6 +1250,10 @@ impl LangString {
1248
1250
seen_rust_tags = !seen_other_tags || seen_rust_tags;
1249
1251
data. no_run = true ;
1250
1252
}
1253
+ LangStringToken :: LangToken ( "standalone" ) => {
1254
+ data. standalone = true ;
1255
+ seen_rust_tags = !seen_other_tags || seen_rust_tags;
1256
+ }
1251
1257
LangStringToken :: LangToken ( x) if x. starts_with ( "edition" ) => {
1252
1258
data. edition = x[ 7 ..] . parse :: < Edition > ( ) . ok ( ) ;
1253
1259
}
You can’t perform that action at this time.
0 commit comments