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 > ,
@@ -1190,6 +1191,7 @@ impl Default for LangString {
1190
1191
rust : true ,
1191
1192
test_harness : false ,
1192
1193
compile_fail : false ,
1194
+ standalone : false ,
1193
1195
error_codes : Vec :: new ( ) ,
1194
1196
edition : None ,
1195
1197
added_classes : Vec :: new ( ) ,
@@ -1259,6 +1261,10 @@ impl LangString {
1259
1261
seen_rust_tags = !seen_other_tags || seen_rust_tags;
1260
1262
data. no_run = true ;
1261
1263
}
1264
+ LangStringToken :: LangToken ( "standalone" ) => {
1265
+ data. standalone = true ;
1266
+ seen_rust_tags = !seen_other_tags || seen_rust_tags;
1267
+ }
1262
1268
LangStringToken :: LangToken ( x) if x. starts_with ( "edition" ) => {
1263
1269
data. edition = x[ 7 ..] . parse :: < Edition > ( ) . ok ( ) ;
1264
1270
}
You can’t perform that action at this time.
0 commit comments