1 #![allow(unreachable_code)] 2 3 #[tracing::instrument] unit()4async fn unit() { 5 "" 6 } 7 8 #[tracing::instrument] simple_mismatch() -> String9async fn simple_mismatch() -> String { 10 "" 11 } 12 13 // FIXME: this span is still pretty poor 14 #[tracing::instrument] opaque_unsatisfied() -> impl std::fmt::Display15async fn opaque_unsatisfied() -> impl std::fmt::Display { 16 ("",) 17 } 18 19 struct Wrapper<T>(T); 20 21 #[tracing::instrument] mismatch_with_opaque() -> Wrapper<impl std::fmt::Display>22async fn mismatch_with_opaque() -> Wrapper<impl std::fmt::Display> { 23 "" 24 } 25 26 #[tracing::instrument] early_return_unit()27async fn early_return_unit() { 28 if true { 29 return ""; 30 } 31 } 32 33 #[tracing::instrument] early_return() -> String34async fn early_return() -> String { 35 if true { 36 return ""; 37 } 38 String::new() 39 } 40 41 #[tracing::instrument] extra_semicolon() -> i3242async fn extra_semicolon() -> i32 { 43 1; 44 } 45 main()46fn main() {} 47