mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00
17 lines
243 B
Rust
17 lines
243 B
Rust
#![feature(never_type)]
|
|
#![deny(unused_must_use)]
|
|
|
|
#[must_use]
|
|
fn foo() {}
|
|
|
|
#[must_use]
|
|
fn bar() -> ! {
|
|
unimplemented!()
|
|
}
|
|
|
|
fn main() {
|
|
foo(); //~ ERROR unused return value of `foo`
|
|
|
|
bar(); //~ ERROR unused return value of `bar`
|
|
}
|