]> git.lizzy.rs Git - rust.git/blob - src/test/ui/cleanup-rvalue-scopes-cf.stderr
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / cleanup-rvalue-scopes-cf.stderr
1 error[E0716]: temporary value dropped while borrowed
2   --> $DIR/cleanup-rvalue-scopes-cf.rs:26:19
3    |
4 LL |     let x1 = arg(&AddFlags(1));
5    |                   ^^^^^^^^^^^ - temporary value is freed at the end of this statement
6    |                   |
7    |                   creates a temporary which is freed while still in use
8 ...
9 LL |     (x1, x2, x3, x4, x5, x6, x7);
10    |      -- borrow later used here
11    |
12    = note: consider using a `let` binding to create a longer lived value
13
14 error[E0716]: temporary value dropped while borrowed
15   --> $DIR/cleanup-rvalue-scopes-cf.rs:27:14
16    |
17 LL |     let x2 = AddFlags(1).get();
18    |              ^^^^^^^^^^^      - temporary value is freed at the end of this statement
19    |              |
20    |              creates a temporary which is freed while still in use
21 ...
22 LL |     (x1, x2, x3, x4, x5, x6, x7);
23    |          -- borrow later used here
24    |
25    = note: consider using a `let` binding to create a longer lived value
26
27 error[E0716]: temporary value dropped while borrowed
28   --> $DIR/cleanup-rvalue-scopes-cf.rs:28:21
29    |
30 LL |     let x3 = &*arg(&AddFlags(1));
31    |                     ^^^^^^^^^^^ - temporary value is freed at the end of this statement
32    |                     |
33    |                     creates a temporary which is freed while still in use
34 ...
35 LL |     (x1, x2, x3, x4, x5, x6, x7);
36    |              -- borrow later used here
37    |
38    = note: consider using a `let` binding to create a longer lived value
39
40 error[E0716]: temporary value dropped while borrowed
41   --> $DIR/cleanup-rvalue-scopes-cf.rs:29:24
42    |
43 LL |     let ref x4 = *arg(&AddFlags(1));
44    |                        ^^^^^^^^^^^ - temporary value is freed at the end of this statement
45    |                        |
46    |                        creates a temporary which is freed while still in use
47 ...
48 LL |     (x1, x2, x3, x4, x5, x6, x7);
49    |                  -- borrow later used here
50    |
51    = note: consider using a `let` binding to create a longer lived value
52
53 error[E0716]: temporary value dropped while borrowed
54   --> $DIR/cleanup-rvalue-scopes-cf.rs:30:24
55    |
56 LL |     let &ref x5 = arg(&AddFlags(1));
57    |                        ^^^^^^^^^^^ - temporary value is freed at the end of this statement
58    |                        |
59    |                        creates a temporary which is freed while still in use
60 ...
61 LL |     (x1, x2, x3, x4, x5, x6, x7);
62    |                      -- borrow later used here
63    |
64    = note: consider using a `let` binding to create a longer lived value
65
66 error[E0716]: temporary value dropped while borrowed
67   --> $DIR/cleanup-rvalue-scopes-cf.rs:31:14
68    |
69 LL |     let x6 = AddFlags(1).get();
70    |              ^^^^^^^^^^^      - temporary value is freed at the end of this statement
71    |              |
72    |              creates a temporary which is freed while still in use
73 ...
74 LL |     (x1, x2, x3, x4, x5, x6, x7);
75    |                          -- borrow later used here
76    |
77    = note: consider using a `let` binding to create a longer lived value
78
79 error[E0716]: temporary value dropped while borrowed
80   --> $DIR/cleanup-rvalue-scopes-cf.rs:32:44
81    |
82 LL |     let StackBox { f: x7 } = StackBox { f: AddFlags(1).get() };
83    |                                            ^^^^^^^^^^^        - temporary value is freed at the end of this statement
84    |                                            |
85    |                                            creates a temporary which is freed while still in use
86 LL |
87 LL |     (x1, x2, x3, x4, x5, x6, x7);
88    |                              -- borrow later used here
89    |
90    = note: consider using a `let` binding to create a longer lived value
91
92 error: aborting due to 7 previous errors
93
94 For more information about this error, try `rustc --explain E0716`.