summary refs log tree commit diff
path: root/src/test/ui/issues/issue-17545.rs
blob: d62c0b9f32cb9212ef5069dc01ee1b56f9fc5a3b (plain)
1
2
3
4
5
6
7
8
9
10
#![feature(fn_traits)]

fn id<T>(x: T) -> T { x }

pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
    bar.call((
        &id(()), //~ ERROR borrowed value does not live long enough
    ));
}
fn main() {}