fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0716]: temporary value dropped while borrowed 2 --> $DIR/promoted_const_call2.rs:4:26 3 | 4LL | let _: &'static _ = &id(&String::new()); 5 | ---------- ^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use 6 | | 7 | type annotation requires that borrow lasts for `'static` 8... 9LL | }; 10 | - temporary value is freed at the end of this statement 11 12error[E0716]: temporary value dropped while borrowed 13 --> $DIR/promoted_const_call2.rs:4:30 14 | 15LL | let _: &'static _ = &id(&String::new()); 16 | ---------- ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement 17 | | | 18 | | creates a temporary value which is freed while still in use 19 | type annotation requires that borrow lasts for `'static` 20 21error[E0716]: temporary value dropped while borrowed 22 --> $DIR/promoted_const_call2.rs:11:26 23 | 24LL | let _: &'static _ = &id(&String::new()); 25 | ---------- ^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use 26 | | 27 | type annotation requires that borrow lasts for `'static` 28... 29LL | } 30 | - temporary value is freed at the end of this statement 31 32error[E0716]: temporary value dropped while borrowed 33 --> $DIR/promoted_const_call2.rs:11:30 34 | 35LL | let _: &'static _ = &id(&String::new()); 36 | ---------- ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement 37 | | | 38 | | creates a temporary value which is freed while still in use 39 | type annotation requires that borrow lasts for `'static` 40 41error[E0493]: destructor of `String` cannot be evaluated at compile-time 42 --> $DIR/promoted_const_call2.rs:4:30 43 | 44LL | let _: &'static _ = &id(&String::new()); 45 | ^^^^^^^^^^^^^ the destructor for this type cannot be evaluated in constants 46 47error: aborting due to 5 previous errors 48 49Some errors have detailed explanations: E0493, E0716. 50For more information about an error, try `rustc --explain E0493`.