about summary refs log tree commit diff
path: root/tests/ui/issues/auxiliary/issue-34796-aux.rs
blob: 0e91bb4bcdc1f3c5fef7eafa17760377c4072e4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![crate_type = "lib"]
pub trait Future {
    type Item;
    type Error;
}

impl Future for u32 {
    type Item = ();
    type Error = Box<()>;
}

fn foo() -> Box<dyn Future<Item=(), Error=Box<()>>> {
    Box::new(0u32)
}

pub fn bar<F, A, B>(_s: F)
    where F: Fn(A) -> B,
{
    foo();
}