fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1//@aux-build:proc_macros.rs 2 3#![warn(clippy::must_use_unit)] 4#![allow(clippy::unused_unit)] 5 6extern crate proc_macros; 7use proc_macros::external; 8 9 10pub fn must_use_default() {} 11 12 13pub fn must_use_unit() -> () {} 14 15 16pub fn must_use_with_note() {} 17 18fn main() { 19 must_use_default(); 20 must_use_unit(); 21 must_use_with_note(); 22 23 // We should not lint in external macros 24 external!( 25 #[must_use] 26 fn foo() {} 27 ); 28}