Sign in
fuchsia
/
third_party
/
rust
/
87ef96d3946ed4add766c0a2cd72d8443e92e4a0
/
.
/
src
/
test
/
run-fail
/
never-type-arg.rs
blob: fc7f2fc90d704fdabec3094ad52f0e7f411d6a55 [
file
] [
log
] [
blame
]
// Test that we can use ! as an argument to a trait impl.
// error-pattern:oh no!
#![
feature
(
never_type
)]
struct
Wub
;
impl
PartialEq
<!>
for
Wub
{
fn
eq
(&
self
,
other
:
&!)
->
bool
{
*
other
}
}
fn
main
()
{
let
_
=
Wub
==
panic
!(
"oh no!"
);
}