fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0716]: temporary value dropped while borrowed 2 --> $DIR/cleanup-rvalue-scopes-cf.rs:26:19 3 | 4LL | let x1 = arg(&AddFlags(1)); 5 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement 6 | | 7 | creates a temporary value which is freed while still in use 8... 9LL | (x1, x2, x3, x4, x5, x6, x7); 10 | -- borrow later used here 11 | 12help: consider using a `let` binding to create a longer lived value 13 | 14LL ~ let binding = AddFlags(1); 15LL ~ let x1 = arg(&binding); 16 | 17 18error[E0716]: temporary value dropped while borrowed 19 --> $DIR/cleanup-rvalue-scopes-cf.rs:27:14 20 | 21LL | let x2 = AddFlags(1).get(); 22 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement 23 | | 24 | creates a temporary value which is freed while still in use 25... 26LL | (x1, x2, x3, x4, x5, x6, x7); 27 | -- borrow later used here 28 | 29help: consider using a `let` binding to create a longer lived value 30 | 31LL ~ let binding = AddFlags(1); 32LL ~ let x2 = binding.get(); 33 | 34 35error[E0716]: temporary value dropped while borrowed 36 --> $DIR/cleanup-rvalue-scopes-cf.rs:28:21 37 | 38LL | let x3 = &*arg(&AddFlags(1)); 39 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement 40 | | 41 | creates a temporary value which is freed while still in use 42... 43LL | (x1, x2, x3, x4, x5, x6, x7); 44 | -- borrow later used here 45 | 46help: consider using a `let` binding to create a longer lived value 47 | 48LL ~ let binding = AddFlags(1); 49LL ~ let x3 = &*arg(&binding); 50 | 51 52error[E0716]: temporary value dropped while borrowed 53 --> $DIR/cleanup-rvalue-scopes-cf.rs:29:24 54 | 55LL | let ref x4 = *arg(&AddFlags(1)); 56 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement 57 | | 58 | creates a temporary value which is freed while still in use 59... 60LL | (x1, x2, x3, x4, x5, x6, x7); 61 | -- borrow later used here 62 | 63help: consider using a `let` binding to create a longer lived value 64 | 65LL ~ let binding = AddFlags(1); 66LL ~ let ref x4 = *arg(&binding); 67 | 68 69error[E0716]: temporary value dropped while borrowed 70 --> $DIR/cleanup-rvalue-scopes-cf.rs:30:24 71 | 72LL | let &ref x5 = arg(&AddFlags(1)); 73 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement 74 | | 75 | creates a temporary value which is freed while still in use 76... 77LL | (x1, x2, x3, x4, x5, x6, x7); 78 | -- borrow later used here 79 | 80help: consider using a `let` binding to create a longer lived value 81 | 82LL ~ let binding = AddFlags(1); 83LL ~ let &ref x5 = arg(&binding); 84 | 85 86error[E0716]: temporary value dropped while borrowed 87 --> $DIR/cleanup-rvalue-scopes-cf.rs:31:14 88 | 89LL | let x6 = AddFlags(1).get(); 90 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement 91 | | 92 | creates a temporary value which is freed while still in use 93... 94LL | (x1, x2, x3, x4, x5, x6, x7); 95 | -- borrow later used here 96 | 97help: consider using a `let` binding to create a longer lived value 98 | 99LL ~ let binding = AddFlags(1); 100LL ~ let x6 = binding.get(); 101 | 102 103error[E0716]: temporary value dropped while borrowed 104 --> $DIR/cleanup-rvalue-scopes-cf.rs:32:44 105 | 106LL | let StackBox { f: x7 } = StackBox { f: AddFlags(1).get() }; 107 | ^^^^^^^^^^^ - temporary value is freed at the end of this statement 108 | | 109 | creates a temporary value which is freed while still in use 110LL | 111LL | (x1, x2, x3, x4, x5, x6, x7); 112 | -- borrow later used here 113 | 114help: consider using a `let` binding to create a longer lived value 115 | 116LL ~ let binding = AddFlags(1); 117LL ~ let StackBox { f: x7 } = StackBox { f: binding.get() }; 118 | 119 120error: aborting due to 7 previous errors 121 122For more information about this error, try `rustc --explain E0716`.