Skip to content

Commit faff382

Browse files
committed
Don't emit the termination lang item in tests
1 parent 347165f commit faff382

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/termination.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use libc;
1919
///
2020
/// The default implementations are returning `libc::EXIT_SUCCESS` to indicate
2121
/// a successful execution. In case of a failure, `libc::EXIT_FAILURE` is returned.
22-
#[cfg_attr(not(stage0), lang = "termination")]
22+
#[cfg_attr(not(any(stage0, test)), lang = "termination")]
2323
#[unstable(feature = "termination_trait", issue = "43301")]
2424
#[rustc_on_unimplemented =
2525
"`main` can only return types that implement {Termination}, not `{Self}`"]

0 commit comments

Comments
 (0)