1 error[E0493]: destructor of `String` cannot be evaluated at compile-time
2 --> $DIR/promoted_const_call5.rs:26:30
4 LL | let _: &'static _ = &id(&new_string());
5 | ^^^^^^^^^^^^ - value is dropped here
7 | the destructor for this type cannot be evaluated in constants
9 error[E0716]: temporary value dropped while borrowed
10 --> $DIR/promoted_const_call5.rs:26:26
12 LL | let _: &'static _ = &id(&new_string());
13 | ---------- ^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
15 | type annotation requires that borrow lasts for `'static`
18 | - temporary value is freed at the end of this statement
20 error[E0716]: temporary value dropped while borrowed
21 --> $DIR/promoted_const_call5.rs:26:30
23 LL | let _: &'static _ = &id(&new_string());
24 | ----^^^^^^^^^^^^-- temporary value is freed at the end of this statement
26 | | creates a temporary value which is freed while still in use
27 | argument requires that borrow lasts for `'static`
29 error[E0716]: temporary value dropped while borrowed
30 --> $DIR/promoted_const_call5.rs:31:26
32 LL | let _: &'static _ = &new_manually_drop(new_string());
33 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
35 | type annotation requires that borrow lasts for `'static`
38 | - temporary value is freed at the end of this statement
40 error[E0716]: temporary value dropped while borrowed
41 --> $DIR/promoted_const_call5.rs:36:26
43 LL | let _: &'static _ = &id(&new_string());
44 | ---------- ^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
46 | type annotation requires that borrow lasts for `'static`
49 | - temporary value is freed at the end of this statement
51 error[E0716]: temporary value dropped while borrowed
52 --> $DIR/promoted_const_call5.rs:36:30
54 LL | let _: &'static _ = &id(&new_string());
55 | ----^^^^^^^^^^^^-- temporary value is freed at the end of this statement
57 | | creates a temporary value which is freed while still in use
58 | argument requires that borrow lasts for `'static`
60 error[E0716]: temporary value dropped while borrowed
61 --> $DIR/promoted_const_call5.rs:40:26
63 LL | let _: &'static _ = &new_manually_drop(new_string());
64 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
66 | type annotation requires that borrow lasts for `'static`
69 | - temporary value is freed at the end of this statement
71 error: aborting due to 7 previous errors
73 Some errors have detailed explanations: E0493, E0716.
74 For more information about an error, try `rustc --explain E0493`.