]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/no_revealing_outside_defining_module.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / type-alias-impl-trait / no_revealing_outside_defining_module.rs
1 #![feature(type_alias_impl_trait)]
2
3 fn main() {}
4
5 mod boo {
6     pub type Boo = impl ::std::fmt::Debug;
7     fn bomp() -> Boo {
8         ""
9     }
10 }
11
12 // We 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 }