mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
17 lines
231 B
Rust
17 lines
231 B
Rust
#![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`
|
|
}
|