1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#![feature(never_type)] #![deny(unused_must_use)] #[must_use] fn foo() {} #[must_use] fn bar() -> ! { unimplemented!() } fn main() { foo(); //~ unused return value of `foo` bar(); //~ unused return value of `bar` }