]> git.lizzy.rs Git - rust.git/blob - src/test/ui/existential_types/no_revealing_outside_defining_module.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / existential_types / no_revealing_outside_defining_module.rs
1 #![feature(existential_type)]
2
3 fn main() {}
4
5 mod boo {
6     pub existential type Boo: ::std::fmt::Debug;
7     fn bomp() -> Boo {
8         ""
9     }
10 }
11
12 // don't actually know the type here
13
14 fn bomp2() {
15     let _: &str = bomp(); //~ ERROR mismatched types
16 }
17
18 fn bomp() -> boo::Boo {
19     "" //~ ERROR mismatched types
20 }
21
22 fn bomp_loop() -> boo::Boo {
23     loop {}
24 }