1 error[E0716]: temporary value dropped while borrowed
2 --> $DIR/issue-57265-return-type-wf-check.rs:20:23
4 LL | let (_, z) = foo(&"hello".to_string());
5 | -----^^^^^^^^^^^^^^^^^^^-- temporary value is freed at the end of this statement
7 | | creates a temporary value which is freed while still in use
8 | argument requires that borrow lasts for `'static`
10 error: aborting due to previous error
12 For more information about this error, try `rustc --explain E0716`.