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