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