]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/issues/issue-70877.rs
1 #![feature(type_alias_impl_trait)]
3 type FooArg
<'a
> = &'a
dyn ToString
;
4 type FooRet
= impl std
::fmt
::Debug
;
6 type FooItem
= Box
<dyn Fn(FooArg
) -> FooRet
>;
7 type Foo
= impl Iterator
<Item
= FooItem
>; //~ ERROR: type mismatch
12 impl Iterator
for Bar
{
15 fn next(&mut self) -> Option
<Self::Item
> {
20 fn quux(st
: FooArg
) -> FooRet
{
28 fn oof() -> impl std
::fmt
::Debug
{
30 let func
= bar
.next().unwrap();