1 error[E0716]: temporary value dropped while borrowed
2 --> $DIR/cleanup-rvalue-scopes-cf.rs:26:19
4 LL | let x1 = arg(&AddFlags(1));
5 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
7 | creates a temporary value which is freed while still in use
9 LL | (x1, x2, x3, x4, x5, x6, x7);
10 | -- borrow later used here
12 help: consider using a `let` binding to create a longer lived value
14 LL ~ let binding = AddFlags(1);
15 LL ~ let x1 = arg(&binding);
18 error[E0716]: temporary value dropped while borrowed
19 --> $DIR/cleanup-rvalue-scopes-cf.rs:27:14
21 LL | let x2 = AddFlags(1).get();
22 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
24 | creates a temporary value which is freed while still in use
26 LL | (x1, x2, x3, x4, x5, x6, x7);
27 | -- borrow later used here
29 help: consider using a `let` binding to create a longer lived value
31 LL ~ let binding = AddFlags(1);
32 LL ~ let x2 = binding.get();
35 error[E0716]: temporary value dropped while borrowed
36 --> $DIR/cleanup-rvalue-scopes-cf.rs:28:21
38 LL | let x3 = &*arg(&AddFlags(1));
39 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
41 | creates a temporary value which is freed while still in use
43 LL | (x1, x2, x3, x4, x5, x6, x7);
44 | -- borrow later used here
46 help: consider using a `let` binding to create a longer lived value
48 LL ~ let binding = AddFlags(1);
49 LL ~ let x3 = &*arg(&binding);
52 error[E0716]: temporary value dropped while borrowed
53 --> $DIR/cleanup-rvalue-scopes-cf.rs:29:24
55 LL | let ref x4 = *arg(&AddFlags(1));
56 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
58 | creates a temporary value which is freed while still in use
60 LL | (x1, x2, x3, x4, x5, x6, x7);
61 | -- borrow later used here
63 help: consider using a `let` binding to create a longer lived value
65 LL ~ let binding = AddFlags(1);
66 LL ~ let ref x4 = *arg(&binding);
69 error[E0716]: temporary value dropped while borrowed
70 --> $DIR/cleanup-rvalue-scopes-cf.rs:30:24
72 LL | let &ref x5 = arg(&AddFlags(1));
73 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
75 | creates a temporary value which is freed while still in use
77 LL | (x1, x2, x3, x4, x5, x6, x7);
78 | -- borrow later used here
80 help: consider using a `let` binding to create a longer lived value
82 LL ~ let binding = AddFlags(1);
83 LL ~ let &ref x5 = arg(&binding);
86 error[E0716]: temporary value dropped while borrowed
87 --> $DIR/cleanup-rvalue-scopes-cf.rs:31:14
89 LL | let x6 = AddFlags(1).get();
90 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
92 | creates a temporary value which is freed while still in use
94 LL | (x1, x2, x3, x4, x5, x6, x7);
95 | -- borrow later used here
97 help: consider using a `let` binding to create a longer lived value
99 LL ~ let binding = AddFlags(1);
100 LL ~ let x6 = binding.get();
103 error[E0716]: temporary value dropped while borrowed
104 --> $DIR/cleanup-rvalue-scopes-cf.rs:32:44
106 LL | let StackBox { f: x7 } = StackBox { f: AddFlags(1).get() };
107 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement
109 | creates a temporary value which is freed while still in use
111 LL | (x1, x2, x3, x4, x5, x6, x7);
112 | -- borrow later used here
114 help: consider using a `let` binding to create a longer lived value
116 LL ~ let binding = AddFlags(1);
117 LL ~ let StackBox { f: x7 } = StackBox { f: binding.get() };
120 error: aborting due to 7 previous errors
122 For more information about this error, try `rustc --explain E0716`.