mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
14 lines
289 B
Rust
14 lines
289 B
Rust
// Test that an assignment of type ! makes the rest of the block dead code.
|
|
//
|
|
//@ check-pass
|
|
|
|
#![feature(never_type)]
|
|
#![expect(dropping_copy_types)]
|
|
#![warn(unused)]
|
|
|
|
fn main() {
|
|
let x: ! = panic!("aah"); //~ WARN unused
|
|
drop(x); //~ WARN unreachable
|
|
//~^ WARN unreachable
|
|
}
|