File tree 4 files changed +5
-5
lines changed
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -518,7 +518,7 @@ pub fn panicking() -> bool {
518
518
}
519
519
520
520
/// Entry point of panics from the libcore crate (`panic_impl` lang item).
521
- #[ cfg( not( test) ) ]
521
+ #[ cfg( not( any ( test, doctest ) ) ) ]
522
522
#[ panic_handler]
523
523
pub fn begin_panic_handler ( info : & PanicInfo < ' _ > ) -> ! {
524
524
struct PanicPayload < ' a > {
@@ -590,7 +590,7 @@ pub fn begin_panic_handler(info: &PanicInfo<'_>) -> ! {
590
590
/// panic!() and assert!(). In particular, this is the only entry point that supports
591
591
/// arbitrary payloads, not just format strings.
592
592
#[ unstable( feature = "libstd_sys_internals" , reason = "used by the panic! macro" , issue = "none" ) ]
593
- #[ cfg_attr( not( test) , lang = "begin_panic" ) ]
593
+ #[ cfg_attr( not( any ( test, doctest ) ) , lang = "begin_panic" ) ]
594
594
// lang item for CTFE panic support
595
595
// never inline unless panic_immediate_abort to avoid code
596
596
// bloat at the call sites as much as possible
Original file line number Diff line number Diff line change 12
12
13
13
mod dwarf;
14
14
15
- #[ cfg( not( test) ) ]
15
+ #[ cfg( not( any ( test, doctest ) ) ) ]
16
16
cfg_if:: cfg_if! {
17
17
if #[ cfg( target_os = "emscripten" ) ] {
18
18
mod emcc;
Original file line number Diff line number Diff line change @@ -2151,7 +2151,7 @@ pub fn id() -> u32 {
2151
2151
/// of the `main` function, this trait is likely to be available only on
2152
2152
/// standard library's runtime for convenience. Other runtimes are not required
2153
2153
/// to provide similar functionality.
2154
- #[ cfg_attr( not( test) , lang = "termination" ) ]
2154
+ #[ cfg_attr( not( any ( test, doctest ) ) , lang = "termination" ) ]
2155
2155
#[ stable( feature = "termination_trait_lib" , since = "1.61.0" ) ]
2156
2156
#[ rustc_on_unimplemented(
2157
2157
on(
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ fn lang_start_internal(
154
154
ret_code
155
155
}
156
156
157
- #[ cfg( not( test) ) ]
157
+ #[ cfg( not( any ( test, doctest ) ) ) ]
158
158
#[ lang = "start" ]
159
159
fn lang_start < T : crate :: process:: Termination + ' static > (
160
160
main : fn ( ) -> T ,
You can’t perform that action at this time.
0 commit comments