diff options
| author | John Turner <jturner.usa@gmail.com> | 2025-12-21 04:20:53 +0000 |
|---|---|---|
| committer | John Turner <jturner.usa@gmail.com> | 2025-12-22 08:05:20 +0000 |
| commit | 96708614ba46c42f87b23f2a957c510499d8811e (patch) | |
| tree | 372dcf90f1a6fdf1b90f5d006ce7a32717f47166 /subprojects/thiserror/tests/test_option.rs | |
| parent | 0ec856797256b5d9807929e1b32c03756eb43124 (diff) | |
| download | gentoo-utils-master.tar.gz | |
port to meson cargoHEADmasterfeature/port-to-meson-cargo
Use the new unstable meson cargo support. This simplifies the
meson.build script and allows to use crates such as clap that require
picking up features from Cargo.toml.
This also allows us to not embed thiserror in subprojects, and instead
use a wrap file with a custom meson.build and some patches to make it
compile without running its build.rs script.
Diffstat (limited to 'subprojects/thiserror/tests/test_option.rs')
| -rw-r--r-- | subprojects/thiserror/tests/test_option.rs | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/subprojects/thiserror/tests/test_option.rs b/subprojects/thiserror/tests/test_option.rs deleted file mode 100644 index 21cd5e1..0000000 --- a/subprojects/thiserror/tests/test_option.rs +++ /dev/null @@ -1,109 +0,0 @@ -#![cfg(feature = "std")] -#![cfg_attr(thiserror_nightly_testing, feature(error_generic_member_access))] - -#[cfg(thiserror_nightly_testing)] -pub mod structs { - use std::backtrace::Backtrace; - use thiserror::Error; - - #[derive(Error, Debug)] - #[error("...")] - pub struct OptSourceNoBacktrace { - #[source] - pub source: Option<anyhow::Error>, - } - - #[derive(Error, Debug)] - #[error("...")] - pub struct OptSourceAlwaysBacktrace { - #[source] - pub source: Option<anyhow::Error>, - pub backtrace: Backtrace, - } - - #[derive(Error, Debug)] - #[error("...")] - pub struct NoSourceOptBacktrace { - #[backtrace] - pub backtrace: Option<Backtrace>, - } - - #[derive(Error, Debug)] - #[error("...")] - pub struct AlwaysSourceOptBacktrace { - pub source: anyhow::Error, - #[backtrace] - pub backtrace: Option<Backtrace>, - } - - #[derive(Error, Debug)] - #[error("...")] - pub struct OptSourceOptBacktrace { - #[source] - pub source: Option<anyhow::Error>, - #[backtrace] - pub backtrace: Option<Backtrace>, - } -} - -#[cfg(thiserror_nightly_testing)] -pub mod enums { - use std::backtrace::Backtrace; - use thiserror::Error; - - #[derive(Error, Debug)] - pub enum OptSourceNoBacktrace { - #[error("...")] - Test { - #[source] - source: Option<anyhow::Error>, - }, - } - - #[derive(Error, Debug)] - pub enum OptSourceAlwaysBacktrace { - #[error("...")] - Test { - #[source] - source: Option<anyhow::Error>, - backtrace: Backtrace, - }, - } - - #[derive(Error, Debug)] - pub enum NoSourceOptBacktrace { - #[error("...")] - Test { - #[backtrace] - backtrace: Option<Backtrace>, - }, - } - - #[derive(Error, Debug)] - pub enum AlwaysSourceOptBacktrace { - #[error("...")] - Test { - source: anyhow::Error, - #[backtrace] - backtrace: Option<Backtrace>, - }, - } - - #[derive(Error, Debug)] - pub enum OptSourceOptBacktrace { - #[error("...")] - Test { - #[source] - source: Option<anyhow::Error>, - #[backtrace] - backtrace: Option<Backtrace>, - }, - } -} - -#[test] -#[cfg_attr( - not(thiserror_nightly_testing), - ignore = "requires `--cfg=thiserror_nightly_testing`" -)] -fn test_option() {} |
