2022-02-14 10:10:22 -06:00
|
|
|
//@ check-pass
|
|
|
|
|
2022-02-16 09:48:46 -06:00
|
|
|
use std::fmt::Debug;
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct Target;
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct Source;
|
|
|
|
impl From<Source> for Target {
|
|
|
|
fn from(_: Source) -> Self {
|
|
|
|
Self
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn maybe_source() -> Result<(), Source> {
|
|
|
|
todo!()
|
2022-02-14 10:10:22 -06:00
|
|
|
}
|
|
|
|
|
2022-02-16 09:48:46 -06:00
|
|
|
pub fn typaram() -> Result<(), impl Debug> {
|
|
|
|
maybe_source()?;
|
|
|
|
Ok::<_, Target>(())
|
|
|
|
}
|
2022-02-14 10:10:22 -06:00
|
|
|
|
2022-02-16 09:48:46 -06:00
|
|
|
pub fn direct() -> Result<(), impl Debug> {
|
|
|
|
maybe_source()?;
|
|
|
|
Err(Target)
|
|
|
|
}
|
2022-02-14 10:10:22 -06:00
|
|
|
|
2022-02-17 07:28:06 -06:00
|
|
|
fn main() {}
|