]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-57265-return-type-wf-check.stderr
Rollup merge of #103146 - joboet:cleanup_pthread_condvar, r=Mark-Simulacrum
[rust.git] / src / test / ui / nll / issue-57265-return-type-wf-check.stderr
1 error[E0716]: temporary value dropped while borrowed
2   --> $DIR/issue-57265-return-type-wf-check.rs:20:23
3    |
4 LL |     let (_, z) = foo(&"hello".to_string());
5    |                  -----^^^^^^^^^^^^^^^^^^^-- temporary value is freed at the end of this statement
6    |                  |    |
7    |                  |    creates a temporary value which is freed while still in use
8    |                  argument requires that borrow lasts for `'static`
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0716`.