2022-02-14 16:10:22 +00:00
|
|
|
// check-pass
|
|
|
|
|
2022-02-16 15:48:46 +00: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 16:10:22 +00:00
|
|
|
}
|
|
|
|
|
2022-02-16 15:48:46 +00:00
|
|
|
pub fn typaram() -> Result<(), impl Debug> {
|
|
|
|
maybe_source()?;
|
|
|
|
Ok::<_, Target>(())
|
|
|
|
}
|
2022-02-14 16:10:22 +00:00
|
|
|
|
2022-02-16 15:48:46 +00:00
|
|
|
pub fn direct() -> Result<(), impl Debug> {
|
|
|
|
maybe_source()?;
|
|
|
|
Err(Target)
|
|
|
|
}
|
2022-02-14 16:10:22 +00:00
|
|
|
|
2022-02-16 15:48:46 +00:00
|
|
|
fn main() {}
|