-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-syntaxextArea: Syntax extensionsArea: Syntax extensions
Description
Often I find myself writing code such as:
#[cfg(test)]
fn assert_something_expensive() { ... }
#[cfg(not(test))]
fn assert_something_expensive() { return; }
Sometimes this is logic that is not just an assert, in the case of rt::comm::block_on(). I wish for a macro so this could be done more concisely without needing to define clunky new function items.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-syntaxextArea: Syntax extensionsArea: Syntax extensions