about summary refs log tree commit diff
path: root/tests/ui/type-alias-impl-trait/issue-69323.rs
blob: af536186f72b1143ceacfaa79b47d6cbc9b60958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ check-pass

#![feature(type_alias_impl_trait)]

use std::iter::{once, Chain};

fn test1<A: Iterator<Item = &'static str>>(x: A) -> Chain<A, impl Iterator<Item = &'static str>> {
    x.chain(once(","))
}

type I<A> = Chain<A, impl Iterator<Item = &'static str>>;
#[define_opaque(I)]
fn test2<A: Iterator<Item = &'static str>>(x: A) -> I<A> {
    x.chain(once(","))
}

fn main() {}