]> git.lizzy.rs Git - rust.git/blob - src/test/ui/cleanup-rvalue-scopes-cf.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / cleanup-rvalue-scopes-cf.stderr
1 error[E0597]: borrowed value does not live long enough
2   --> $DIR/cleanup-rvalue-scopes-cf.rs:28:19
3    |
4 LL |     let _x = arg(&AddFlags(1)); //~ ERROR value does not live long enough
5    |                   ^^^^^^^^^^^ - temporary value dropped here while still borrowed
6    |                   |
7    |                   temporary value does not live long enough
8 ...
9 LL | }
10    | - temporary value needs to live until here
11    |
12    = note: consider using a `let` binding to increase its lifetime
13
14 error[E0597]: borrowed value does not live long enough
15   --> $DIR/cleanup-rvalue-scopes-cf.rs:29:14
16    |
17 LL |     let _x = AddFlags(1).get(); //~ ERROR value does not live long enough
18    |              ^^^^^^^^^^^      - temporary value dropped here while still borrowed
19    |              |
20    |              temporary value does not live long enough
21 ...
22 LL | }
23    | - temporary value needs to live until here
24    |
25    = note: consider using a `let` binding to increase its lifetime
26
27 error[E0597]: borrowed value does not live long enough
28   --> $DIR/cleanup-rvalue-scopes-cf.rs:30:21
29    |
30 LL |     let _x = &*arg(&AddFlags(1)); //~ ERROR value does not live long enough
31    |                     ^^^^^^^^^^^ - temporary value dropped here while still borrowed
32    |                     |
33    |                     temporary value does not live long enough
34 ...
35 LL | }
36    | - temporary value needs to live until here
37    |
38    = note: consider using a `let` binding to increase its lifetime
39
40 error[E0597]: borrowed value does not live long enough
41   --> $DIR/cleanup-rvalue-scopes-cf.rs:31:24
42    |
43 LL |     let ref _x = *arg(&AddFlags(1)); //~ ERROR value does not live long enough
44    |                        ^^^^^^^^^^^ - temporary value dropped here while still borrowed
45    |                        |
46    |                        temporary value does not live long enough
47 ...
48 LL | }
49    | - temporary value needs to live until here
50    |
51    = note: consider using a `let` binding to increase its lifetime
52
53 error[E0597]: borrowed value does not live long enough
54   --> $DIR/cleanup-rvalue-scopes-cf.rs:32:24
55    |
56 LL |     let &ref _x = arg(&AddFlags(1)); //~ ERROR value does not live long enough
57    |                        ^^^^^^^^^^^ - temporary value dropped here while still borrowed
58    |                        |
59    |                        temporary value does not live long enough
60 ...
61 LL | }
62    | - temporary value needs to live until here
63    |
64    = note: consider using a `let` binding to increase its lifetime
65
66 error[E0597]: borrowed value does not live long enough
67   --> $DIR/cleanup-rvalue-scopes-cf.rs:33:14
68    |
69 LL |     let _x = AddFlags(1).get(); //~ ERROR value does not live long enough
70    |              ^^^^^^^^^^^      - temporary value dropped here while still borrowed
71    |              |
72    |              temporary value does not live long enough
73 LL |     let Box { f: _x } = Box { f: AddFlags(1).get() }; //~ ERROR value does not live long enough
74 LL | }
75    | - temporary value needs to live until here
76    |
77    = note: consider using a `let` binding to increase its lifetime
78
79 error[E0597]: borrowed value does not live long enough
80   --> $DIR/cleanup-rvalue-scopes-cf.rs:34:34
81    |
82 LL |     let Box { f: _x } = Box { f: AddFlags(1).get() }; //~ ERROR value does not live long enough
83    |                                  ^^^^^^^^^^^        - temporary value dropped here while still borrowed
84    |                                  |
85    |                                  temporary value does not live long enough
86 LL | }
87    | - temporary value needs to live until here
88    |
89    = note: consider using a `let` binding to increase its lifetime
90
91 error: aborting due to 7 previous errors
92
93 For more information about this error, try `rustc --explain E0597`.