diff --git a/library/std/src/process.rs b/library/std/src/process.rs index 6414a235698b8..20ea03d36eb0e 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -2206,6 +2206,7 @@ impl crate::error::Error for ExitStatusError {} /// ``` #[derive(Clone, Copy, Debug, PartialEq)] #[stable(feature = "process_exitcode", since = "1.61.0")] +#[must_use] pub struct ExitCode(imp::ExitCode); #[stable(feature = "process_exitcode", since = "1.61.0")] diff --git a/tests/ui/attributes/reexport-test-harness-entry-point.rs b/tests/ui/attributes/reexport-test-harness-entry-point.rs index 4de308dafe4a7..ca942e90b04d4 100644 --- a/tests/ui/attributes/reexport-test-harness-entry-point.rs +++ b/tests/ui/attributes/reexport-test-harness-entry-point.rs @@ -11,5 +11,5 @@ fn _unused() { // should resolve to the entry point function the --test harness // creates. - test_main(); + let _ = test_main(); }