Sign in
◑
Theme
rust
/
rust
/
2a61ba8577ed3c3e1cfeb433d06cf5464ff2fdf3
/
.
/
tests
/
ui
/
reachable
/
never-assign-dead-code.rs
blob: 40bf73489eeab6d2acb2bd320bb78a25a98e7377 [
file
]
// Test that an assignment of type ! makes the rest of the block dead code.
//
//@ check-pass
#![
expect
(
dropping_copy_types
)]
#![
warn
(
unused
)]
fn
main
()
{
let
x
:
!
=
panic
!(
"aah"
);
drop
(
x
);
//~ WARN unreachable
//~^ WARN unreachable
}