use std::fmt::Debug; fn main() { let p = test::(); } fn test() -> impl Debug { Person } trait Fly {} #[derive(Debug)] struct Person; impl Fly for Person {}