Jonathan Brouwer b24df42488
Port #[must_use] to new attribute parsing infrastructure
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-06-22 14:51:58 +02:00

10 lines
377 B
Rust

#![no_std]
//@ is "$.index[?(@.name=='example')].attrs" '["#[attr = MustUse]"]'
#[must_use]
pub fn example() -> impl Iterator<Item = i64> {}
//@ is "$.index[?(@.name=='explicit_message')].attrs" '["#[attr = MustUse {reason: \"does nothing if you do not use it\"}]"]'
#[must_use = "does nothing if you do not use it"]
pub fn explicit_message() -> impl Iterator<Item = i64> {}