#![allow(dead_code)]
#[test]
fn compilation() {
{
#[attrimpl::attrimpl]
enum Enum<'a, const N: usize = 7> {
S(#[attrimpl(convert)] &'a String),
U8 {
#[attrimpl(from)]
byte: u8,
},
F64(#[attrimpl(convert)] f64),
}
}
{
enum Either<V0, V1> {
V0(V0),
V1(V1),
}
impl<V0, V1> ::core::convert::From<V0> for Either<V0, V1> {
fn from(value: V0) -> Self {
Self::V0(value)
}
}
impl<V0, V1> ::core::convert::From<V0> for ::std::boxed::Box<Either<V0, V1>> {
fn from(value: V0) -> Self {
::std::boxed::Box::new(Either::from(value))
}
}
impl<V0, V1> ::core::convert::From<V1> for Either<V0, V1> {
fn from(value: V1) -> Self {
Self::V1(value)
}
}
impl<V0, V1> ::core::convert::From<V1> for ::std::boxed::Box<Either<V0, V1>> {
fn from(value: V1) -> Self {
::std::boxed::Box::new(Either::from(value))
}
}
}
{
#[attrimpl::attrimpl]
enum Either<V0, V1> {
V0(#[attrimpl(from)] V0),
V1(#[attrimpl(from)] V1),
}
}
}