]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/issues/issue-70877.rs
1 // revisions: min_tait full_tait
2 #![feature(min_type_alias_impl_trait)]
3 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
4 #![feature(impl_trait_in_bindings)]
5 #![allow(incomplete_features)]
7 type FooArg
<'a
> = &'a
dyn ToString
;
8 type FooRet
= impl std
::fmt
::Debug
;
10 type FooItem
= Box
<dyn Fn(FooArg
) -> FooRet
>;
11 type Foo
= impl Iterator
<Item
= FooItem
>; //~ ERROR: type mismatch
16 impl Iterator
for Bar
{
19 fn next(&mut self) -> Option
<Self::Item
> {
24 fn quux(st
: FooArg
) -> FooRet
{
32 fn oof() -> impl std
::fmt
::Debug
{
34 let func
= bar
.next().unwrap();