Sha256: 1da6748767b9a5b25ad7c013becb2e243b39c7c764cbdf00487794f6fc812890

Contents?: true

Size: 444 Bytes

Versions: 8

Compression:

Stored size: 444 Bytes

Contents

use core::fmt::Debug;
use thiserror::Error;

#[derive(Error, Debug)]
#[error("error")]
struct Error<'a>(#[from] Inner<'a>);

#[derive(Error, Debug)]
#[error("{0}")]
struct Inner<'a>(&'a str);

#[derive(Error, Debug)]
enum Enum<'a> {
    #[error("error")]
    Foo(#[from] Generic<&'a str>),
}

#[derive(Error, Debug)]
#[error("{0:?}")]
struct Generic<T: Debug>(T);

fn main() -> Result<(), Error<'static>> {
    Err(Error(Inner("some text")))
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/thiserror-1.0.69/tests/ui/lifetime.rs
wasmtime-28.0.0 ./ext/cargo-vendor/thiserror-1.0.69/tests/ui/lifetime.rs
wasmtime-27.0.0 ./ext/cargo-vendor/thiserror-1.0.69/tests/ui/lifetime.rs
wasmtime-26.0.0 ./ext/cargo-vendor/thiserror-1.0.65/tests/ui/lifetime.rs
wasmtime-25.0.2 ./ext/cargo-vendor/thiserror-1.0.63/tests/ui/lifetime.rs
wasmtime-25.0.1 ./ext/cargo-vendor/thiserror-1.0.63/tests/ui/lifetime.rs
wasmtime-25.0.0 ./ext/cargo-vendor/thiserror-1.0.63/tests/ui/lifetime.rs
wasmtime-24.0.0 ./ext/cargo-vendor/thiserror-1.0.63/tests/ui/lifetime.rs