#![allow(dead_code, deprecated, unused_variables, unused_mut)] #![feature(hint_must_use)] struct Error; macro_rules! make_error { ($($args:expr),*) => { core::hint::must_use({ let error = make_error(core::format_args!($($args),*)); error }) }; } fn make_error(args: core::fmt::Arguments<'_>) -> Error { Error } async fn f() { log(make_error!("look: {:p}", unsync())).await; } async fn log(error: Error) {} fn unsync() -> *const () { 0 as *const () } fn test() { fn assert_send(_: impl Send) {} assert_send(f()); } fn main() {}