my favourite is the way rust does it: #[expect(whatever)] will emit a warning if no warning of category whatever is emitted. if you refactor things and that warning is no longer relevant, you need to remove the suppression, and using expect instead of allow is perfect for that.
View all comments
Show parent comment
13
u/PrincessRTFM 1d ago
my favourite is the way rust does it:
#[expect(whatever)]will emit a warning if no warning of categorywhateveris emitted. if you refactor things and that warning is no longer relevant, you need to remove the suppression, and usingexpectinstead ofallowis perfect for that.