blob: 86b4380a477aacfa975ac9c184f8045cc8eb98d1 [file]
//@aux-build:proc_macros.rs
#![warn(clippy::must_use_unit)]
#![expect(clippy::unused_unit)]
extern crate proc_macros;
use proc_macros::external;
#[must_use]
pub fn must_use_default() {}
//~^ must_use_unit
#[must_use]
pub fn must_use_unit() -> () {}
//~^ must_use_unit
#[must_use = "With note"]
pub fn must_use_with_note() {}
//~^ must_use_unit
// We should not lint in external macros
external!(
#[must_use]
fn foo() {}
);
fn main() {}