2016-11-10 11:08:21 -06:00
|
|
|
#![feature(fn_traits)]
|
|
|
|
|
2017-08-13 03:46:49 -05:00
|
|
|
fn id<T>(x: T) -> T { x }
|
|
|
|
|
2015-01-12 09:27:25 -06:00
|
|
|
pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
|
2014-12-07 09:22:06 -06:00
|
|
|
bar.call((
|
2019-04-22 02:40:08 -05:00
|
|
|
&id(()), //~ ERROR temporary value dropped while borrowed
|
2014-12-07 09:22:06 -06:00
|
|
|
));
|
|
|
|
}
|
|
|
|
fn main() {}
|