Sign in
fuchsia
/
third_party
/
rust
/
7dbfb0a8ca4ab74ee3111e57a024f9e6257ce37c
/
.
/
src
/
test
/
run-fail
/
return-never-coerce.rs
blob: 18182ff0f9d4768bbc88c04ff1cf32b01c876acf [
file
] [
log
] [
blame
]
// Test that ! coerces to other types.
// error-pattern:aah!
fn
call_another_fn
<
T
,
F
:
FnOnce
()
->
T
>(
f
:
F
)
->
T
{
f
()
}
fn
wub
()
->
!
{
panic
!(
"aah!"
);
}
fn
main
()
{
let
x
:
i32
=
call_another_fn
(
wub
);
let
y
:
u32
=
wub
();
}