File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -588,7 +588,7 @@ pub fn panicking() -> bool {
588588}
589589
590590/// Entry point of panics from the core crate (`panic_impl` lang item).
591- #[ cfg( not( test) ) ]
591+ #[ cfg( not( any ( test, doctest ) ) ) ]
592592#[ panic_handler]
593593pub fn begin_panic_handler ( info : & PanicInfo < ' _ > ) -> ! {
594594 struct FormatStringPayload < ' a > {
@@ -669,7 +669,7 @@ pub fn begin_panic_handler(info: &PanicInfo<'_>) -> ! {
669669/// panic!() and assert!(). In particular, this is the only entry point that supports
670670/// arbitrary payloads, not just format strings.
671671#[ unstable( feature = "libstd_sys_internals" , reason = "used by the panic! macro" , issue = "none" ) ]
672- #[ cfg_attr( not( test) , lang = "begin_panic" ) ]
672+ #[ cfg_attr( not( any ( test, doctest ) ) , lang = "begin_panic" ) ]
673673// lang item for CTFE panic support
674674// never inline unless panic_immediate_abort to avoid code
675675// bloat at the call sites as much as possible
Original file line number Diff line number Diff line change @@ -2311,7 +2311,7 @@ pub fn id() -> u32 {
23112311/// of the `main` function, this trait is likely to be available only on
23122312/// standard library's runtime for convenience. Other runtimes are not required
23132313/// to provide similar functionality.
2314- #[ cfg_attr( not( test) , lang = "termination" ) ]
2314+ #[ cfg_attr( not( any ( test, doctest ) ) , lang = "termination" ) ]
23152315#[ stable( feature = "termination_trait_lib" , since = "1.61.0" ) ]
23162316#[ rustc_on_unimplemented( on(
23172317 cause = "MainFunctionType" ,
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ fn lang_start_internal(
154154 ret_code
155155}
156156
157- #[ cfg( not( test) ) ]
157+ #[ cfg( not( any ( test, doctest ) ) ) ]
158158#[ inline( never) ]
159159#[ lang = "start" ]
160160fn lang_start < T : crate :: process:: Termination + ' static > (
Original file line number Diff line number Diff line change 1212
1313mod dwarf;
1414
15- #[ cfg( not( test) ) ]
15+ #[ cfg( not( any ( test, doctest ) ) ) ]
1616cfg_if:: cfg_if! {
1717 if #[ cfg( target_os = "emscripten" ) ] {
1818 mod emcc;
You can’t perform that action at this time.
0 commit comments