From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../termination-trait-for-box-dyn-error.rs | 6 ++++++ .../rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs | 2 ++ .../rfc-1937-termination-trait/termination-trait-for-exitcode.rs | 7 +++++++ .../termination-trait-for-impl-termination.rs | 3 +++ .../termination-trait-for-result-box-error_ok.rs | 6 ++++++ .../rfc-1937-termination-trait/termination-trait-for-result.rs | 6 ++++++ .../rfcs/rfc-1937-termination-trait/termination-trait-for-str.rs | 4 ++++ 7 files changed, 34 insertions(+) create mode 100644 src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs create mode 100644 src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs create mode 100644 src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs create mode 100644 src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs create mode 100644 src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs create mode 100644 src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs create mode 100644 src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str.rs (limited to 'src/test/ui/rfcs/rfc-1937-termination-trait') diff --git a/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs new file mode 100644 index 000000000..e98582cbc --- /dev/null +++ b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-box-dyn-error.rs @@ -0,0 +1,6 @@ +// run-pass +use std::error::Error; + +fn main() -> Result<(), Box> { + Ok(()) +} diff --git a/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs new file mode 100644 index 000000000..bac695d4e --- /dev/null +++ b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-empty.rs @@ -0,0 +1,2 @@ +// run-pass +fn main() {} diff --git a/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs new file mode 100644 index 000000000..6d4c15620 --- /dev/null +++ b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-exitcode.rs @@ -0,0 +1,7 @@ +// run-pass + +use std::process::ExitCode; + +fn main() -> ExitCode { + ExitCode::SUCCESS +} diff --git a/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs new file mode 100644 index 000000000..c06a135dc --- /dev/null +++ b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-impl-termination.rs @@ -0,0 +1,3 @@ +// run-pass + +fn main() -> impl std::process::Termination { } diff --git a/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs new file mode 100644 index 000000000..b0e932e1f --- /dev/null +++ b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs @@ -0,0 +1,6 @@ +// run-pass +use std::io::Error; + +fn main() -> Result<(), Box> { + Ok(()) +} diff --git a/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs new file mode 100644 index 000000000..30f36c244 --- /dev/null +++ b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-result.rs @@ -0,0 +1,6 @@ +// run-pass +use std::io::Error; + +fn main() -> Result<(), Error> { + Ok(()) +} diff --git a/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str.rs b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str.rs new file mode 100644 index 000000000..f0591c38c --- /dev/null +++ b/src/test/ui/rfcs/rfc-1937-termination-trait/termination-trait-for-str.rs @@ -0,0 +1,4 @@ +// run-pass +fn main() -> Result<(), &'static str> { + Ok(()) +} -- cgit v1.2.3