1 error[E0493]: destructor of `String` cannot be evaluated at compile-time
2 --> $DIR/promoted_const_call3.rs:7:30
4 LL | let _: &'static _ = &id(&String::new());
5 | ^^^^^^^^^^^^^ - value is dropped here
7 | the destructor for this type cannot be evaluated in constants
9 error[E0493]: destructor of `String` cannot be evaluated at compile-time
10 --> $DIR/promoted_const_call3.rs:3:26
12 LL | let _: &'static _ = &String::new();
13 | ^^^^^^^^^^^^^ the destructor for this type cannot be evaluated in constants
16 | - value is dropped here
18 error[E0716]: temporary value dropped while borrowed
19 --> $DIR/promoted_const_call3.rs:3:26
21 LL | let _: &'static _ = &String::new();
22 | ---------- ^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
24 | type annotation requires that borrow lasts for `'static`
27 | - temporary value is freed at the end of this statement
29 error[E0716]: temporary value dropped while borrowed
30 --> $DIR/promoted_const_call3.rs:7:26
32 LL | let _: &'static _ = &id(&String::new());
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_call3.rs:7:30
43 LL | let _: &'static _ = &id(&String::new());
44 | ---------- ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
46 | | creates a temporary value which is freed while still in use
47 | type annotation requires that borrow lasts for `'static`
49 error[E0716]: temporary value dropped while borrowed
50 --> $DIR/promoted_const_call3.rs:12:26
52 LL | let _: &'static _ = &std::mem::ManuallyDrop::new(String::new());
53 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
55 | type annotation requires that borrow lasts for `'static`
58 | - temporary value is freed at the end of this statement
60 error[E0716]: temporary value dropped while borrowed
61 --> $DIR/promoted_const_call3.rs:17:26
63 LL | let _: &'static _ = &String::new();
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[E0716]: temporary value dropped while borrowed
72 --> $DIR/promoted_const_call3.rs:20:26
74 LL | let _: &'static _ = &id(&String::new());
75 | ---------- ^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
77 | type annotation requires that borrow lasts for `'static`
80 | - temporary value is freed at the end of this statement
82 error[E0716]: temporary value dropped while borrowed
83 --> $DIR/promoted_const_call3.rs:20:30
85 LL | let _: &'static _ = &id(&String::new());
86 | ---------- ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
88 | | creates a temporary value which is freed while still in use
89 | type annotation requires that borrow lasts for `'static`
91 error[E0716]: temporary value dropped while borrowed
92 --> $DIR/promoted_const_call3.rs:24:26
94 LL | let _: &'static _ = &std::mem::ManuallyDrop::new(String::new());
95 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
97 | type annotation requires that borrow lasts for `'static`
100 | - temporary value is freed at the end of this statement
102 error: aborting due to 10 previous errors
104 Some errors have detailed explanations: E0493, E0716.
105 For more information about an error, try `rustc --explain E0493`.