mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
18 lines
254 B
Rust
18 lines
254 B
Rust
// Test that we can use ! as an argument to a trait impl.
|
|
|
|
//@ check-pass
|
|
|
|
#![feature(never_type)]
|
|
|
|
struct Wub;
|
|
|
|
impl PartialEq<!> for Wub {
|
|
fn eq(&self, other: &!) -> bool {
|
|
*other
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let _ = Wub == panic!("oh no!");
|
|
}
|