]> git.lizzy.rs Git - rust.git/blob - tests/ui/never_type/never-type-arg.rs
Rollup merge of #106470 - ehuss:tidy-no-wasm, r=Mark-Simulacrum
[rust.git] / tests / ui / never_type / never-type-arg.rs
1 // Test that we can use ! as an argument to a trait impl.
2
3 // check-pass
4
5 #![feature(never_type)]
6
7 struct Wub;
8
9 impl PartialEq<!> for Wub {
10     fn eq(&self, other: &!) -> bool {
11         *other
12     }
13 }
14
15 fn main() {
16     let _ = Wub == panic!("oh no!");
17 }