fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0493]: destructor of `String` cannot be evaluated at compile-time 2 --> $DIR/promoted_const_call3.rs:7:30 3 | 4LL | let _: &'static _ = &id(&String::new()); 5 | ^^^^^^^^^^^^^ - value is dropped here 6 | | 7 | the destructor for this type cannot be evaluated in constants 8 9error[E0493]: destructor of `String` cannot be evaluated at compile-time 10 --> $DIR/promoted_const_call3.rs:3:26 11 | 12LL | let _: &'static _ = &String::new(); 13 | ^^^^^^^^^^^^^ the destructor for this type cannot be evaluated in constants 14... 15LL | }; 16 | - value is dropped here 17 18error[E0716]: temporary value dropped while borrowed 19 --> $DIR/promoted_const_call3.rs:3:26 20 | 21LL | let _: &'static _ = &String::new(); 22 | ---------- ^^^^^^^^^^^^^ creates a temporary value which is freed while still in use 23 | | 24 | type annotation requires that borrow lasts for `'static` 25... 26LL | }; 27 | - temporary value is freed at the end of this statement 28 29error[E0716]: temporary value dropped while borrowed 30 --> $DIR/promoted_const_call3.rs:7:26 31 | 32LL | let _: &'static _ = &id(&String::new()); 33 | ---------- ^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use 34 | | 35 | type annotation requires that borrow lasts for `'static` 36... 37LL | }; 38 | - temporary value is freed at the end of this statement 39 40error[E0716]: temporary value dropped while borrowed 41 --> $DIR/promoted_const_call3.rs:7:30 42 | 43LL | let _: &'static _ = &id(&String::new()); 44 | ---------- ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement 45 | | | 46 | | creates a temporary value which is freed while still in use 47 | type annotation requires that borrow lasts for `'static` 48 49error[E0716]: temporary value dropped while borrowed 50 --> $DIR/promoted_const_call3.rs:12:26 51 | 52LL | let _: &'static _ = &std::mem::ManuallyDrop::new(String::new()); 53 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use 54 | | 55 | type annotation requires that borrow lasts for `'static` 56LL | 57LL | }; 58 | - temporary value is freed at the end of this statement 59 60error[E0716]: temporary value dropped while borrowed 61 --> $DIR/promoted_const_call3.rs:17:26 62 | 63LL | let _: &'static _ = &String::new(); 64 | ---------- ^^^^^^^^^^^^^ creates a temporary value which is freed while still in use 65 | | 66 | type annotation requires that borrow lasts for `'static` 67... 68LL | } 69 | - temporary value is freed at the end of this statement 70 71error[E0716]: temporary value dropped while borrowed 72 --> $DIR/promoted_const_call3.rs:20:26 73 | 74LL | let _: &'static _ = &id(&String::new()); 75 | ---------- ^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use 76 | | 77 | type annotation requires that borrow lasts for `'static` 78... 79LL | } 80 | - temporary value is freed at the end of this statement 81 82error[E0716]: temporary value dropped while borrowed 83 --> $DIR/promoted_const_call3.rs:20:30 84 | 85LL | let _: &'static _ = &id(&String::new()); 86 | ---------- ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement 87 | | | 88 | | creates a temporary value which is freed while still in use 89 | type annotation requires that borrow lasts for `'static` 90 91error[E0716]: temporary value dropped while borrowed 92 --> $DIR/promoted_const_call3.rs:24:26 93 | 94LL | let _: &'static _ = &std::mem::ManuallyDrop::new(String::new()); 95 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use 96 | | 97 | type annotation requires that borrow lasts for `'static` 98LL | 99LL | } 100 | - temporary value is freed at the end of this statement 101 102error: aborting due to 10 previous errors 103 104Some errors have detailed explanations: E0493, E0716. 105For more information about an error, try `rustc --explain E0493`.