]> git.lizzy.rs Git - rust.git/blob - src/test/ui/existential_types/different_defining_uses_never_type.rs
Restrict concrete types to equivalent types
[rust.git] / src / test / ui / existential_types / different_defining_uses_never_type.rs
1 #![feature(existential_type)]
2
3 fn main() {}
4
5 // two definitions with different types
6 existential type Foo: std::fmt::Debug;
7
8 fn foo() -> Foo {
9     ""
10 }
11
12 fn bar() -> Foo { //~ ERROR concrete type differs from previous
13     panic!()
14 }
15
16 fn boo() -> Foo { //~ ERROR concrete type differs from previous
17     loop {}
18 }