]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/issue-17545.rs
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / ui / borrowck / issue-17545.rs
1 #![feature(fn_traits)]
2
3 fn id<T>(x: T) -> T { x }
4
5 pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
6     bar.call((
7         &id(()), //~ ERROR temporary value dropped while borrowed
8     ));
9 }
10 fn main() {}