about summary refs log tree commit diff
path: root/tests/ui/borrowck/format-args-temporary-scopes.e2024.stderr
blob: 506fc6e0965f7fd32188d0cfdbd422c169e7cb99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
error[E0716]: temporary value dropped while borrowed
  --> $DIR/format-args-temporary-scopes.rs:13:25
   |
LL |     println!("{:?}", { &temp() });
   |                      ---^^^^^---
   |                      |  |    |
   |                      |  |    temporary value is freed at the end of this statement
   |                      |  creates a temporary value which is freed while still in use
   |                      borrow later used here
   |
   = note: consider using a `let` binding to create a longer lived value

error[E0716]: temporary value dropped while borrowed
  --> $DIR/format-args-temporary-scopes.rs:19:29
   |
LL |     println!("{:?}{:?}", { &temp() }, ());
   |                          ---^^^^^---
   |                          |  |    |
   |                          |  |    temporary value is freed at the end of this statement
   |                          |  creates a temporary value which is freed while still in use
   |                          borrow later used here
   |
   = note: consider using a `let` binding to create a longer lived value

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0716`.