rust-course/assets/writing-material/posts/attributes.md

218 B

#[derive(Default)]

#[derive(Default)]
struct NotSend(Rc<()>);

fn require_send(_: impl Send) {}

async fn bar() {}
async fn foo() {
    //Returns the "default value" for a type.
    NotSend::default();
}