]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/object/exclusion.rs
2 trait Future
: '
static {
3 // The requirement for Self: Sized must prevent instantiation of
4 // Future::forget in vtables, otherwise there's an infinite type
5 // recursion through <Map<...> as Future>::forget.
6 fn forget(self) where Self: Sized
{
7 Box
::new(Map(self)) as Box
<dyn Future
>;
11 struct Map
<A
>(#[allow(unused_tuple_struct_fields)] A);
12 impl<A
: Future
> Future
for Map
<A
> {}
15 impl Future
for Promise {}