]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / 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 }