]> git.lizzy.rs Git - rust.git/blob - src/test/run-fail/never-associated-type.rs
Auto merge of #63994 - Centril:refactor-qualify-consts, r=spastorino,oli-obk
[rust.git] / src / test / run-fail / never-associated-type.rs
1 // Test that we can use ! as an associated type.
2
3 // error-pattern:kapow!
4
5 #![feature(never_type)]
6
7 trait Foo {
8     type Wow;
9
10     fn smeg(&self) -> Self::Wow;
11 }
12
13 struct Blah;
14 impl Foo for Blah {
15     type Wow = !;
16     fn smeg(&self) -> ! {
17         panic!("kapow!");
18     }
19 }
20
21 fn main() {
22     Blah.smeg();
23 }