]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lazy-type-alias-impl-trait/branches.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / lazy-type-alias-impl-trait / branches.rs
1 #![feature(type_alias_impl_trait)]
2
3 type Foo = impl std::fmt::Debug;
4
5 fn foo(b: bool) -> Foo {
6 if b {
7 vec![42_i32]
8 } else {
9 std::iter::empty().collect()
10 //~^ ERROR `Foo` cannot be built from an iterator over elements of type `_`
11 }
12 }
13
14 fn main() {}