Sign in
fuchsia
/
third_party
/
github.com
/
rust-lang
/
rust
/
refs/tags/1.58.1
/
.
/
src
/
test
/
ui
/
never_type
/
never-assign-dead-code.rs
blob: 7bb7c87097c503a790d517c905cdee80ecad8f11 [
file
] [
log
] [
blame
]
// Test that an assignment of type ! makes the rest of the block dead code.
// check-pass
#![
feature
(
never_type
)]
#![
warn
(
unused
)]
fn
main
()
{
let
x
:
!
=
panic
!(
"aah"
);
//~ WARN unused
drop
(
x
);
//~ WARN unreachable
//~^ WARN unreachable
}