1- error[E0493]: destructor of `String` cannot be evaluated at compile-time
2- --> $DIR/promoted_const_call3.rs:7:30
3- |
4- LL | let _: &'static _ = &id(&String::new());
5- | ^^^^^^^^^^^^^ - value is dropped here
6- | |
7- | the destructor for this type cannot be evaluated in constants
8-
91error[E0493]: destructor of `String` cannot be evaluated at compile-time
102 --> $DIR/promoted_const_call3.rs:3:26
113 |
124LL | let _: &'static _ = &String::new();
135 | ^^^^^^^^^^^^^ the destructor for this type cannot be evaluated in constants
14- ...
6+ LL |
157LL | };
168 | - value is dropped here
179
18- error[E0716]: temporary value dropped while borrowed
19- --> $DIR/promoted_const_call3.rs:3:26
20- |
21- LL | 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- ...
26- LL | };
27- | - temporary value is freed at the end of this statement
28-
29- error[E0716]: temporary value dropped while borrowed
30- --> $DIR/promoted_const_call3.rs:7:26
31- |
32- LL | 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- ...
37- LL | };
38- | - temporary value is freed at the end of this statement
39-
40- error[E0716]: temporary value dropped while borrowed
41- --> $DIR/promoted_const_call3.rs:7:30
10+ error[E0493]: destructor of `String` cannot be evaluated at compile-time
11+ --> $DIR/promoted_const_call3.rs:8:30
4212 |
4313LL | 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`
14+ | ^^^^^^^^^^^^^ - value is dropped here
15+ | |
16+ | the destructor for this type cannot be evaluated in constants
4817
4918error[E0716]: temporary value dropped while borrowed
50- --> $DIR/promoted_const_call3.rs:12 :26
19+ --> $DIR/promoted_const_call3.rs:13 :26
5120 |
5221LL | let _: &'static _ = &std::mem::ManuallyDrop::new(String::new());
5322 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
@@ -58,7 +27,7 @@ LL | };
5827 | - temporary value is freed at the end of this statement
5928
6029error[E0716]: temporary value dropped while borrowed
61- --> $DIR/promoted_const_call3.rs:17 :26
30+ --> $DIR/promoted_const_call3.rs:18 :26
6231 |
6332LL | let _: &'static _ = &String::new();
6433 | ---------- ^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
6938 | - temporary value is freed at the end of this statement
7039
7140error[E0716]: temporary value dropped while borrowed
72- --> $DIR/promoted_const_call3.rs:20 :26
41+ --> $DIR/promoted_const_call3.rs:21 :26
7342 |
7443LL | let _: &'static _ = &id(&String::new());
7544 | ---------- ^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
8049 | - temporary value is freed at the end of this statement
8150
8251error[E0716]: temporary value dropped while borrowed
83- --> $DIR/promoted_const_call3.rs:20 :30
52+ --> $DIR/promoted_const_call3.rs:21 :30
8453 |
8554LL | let _: &'static _ = &id(&String::new());
8655 | ---------- ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
@@ -89,7 +58,7 @@ LL | let _: &'static _ = &id(&String::new());
8958 | type annotation requires that borrow lasts for `'static`
9059
9160error[E0716]: temporary value dropped while borrowed
92- --> $DIR/promoted_const_call3.rs:24 :26
61+ --> $DIR/promoted_const_call3.rs:25 :26
9362 |
9463LL | let _: &'static _ = &std::mem::ManuallyDrop::new(String::new());
9564 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
9968LL | }
10069 | - temporary value is freed at the end of this statement
10170
102- error: aborting due to 10 previous errors
71+ error: aborting due to 7 previous errors
10372
10473Some errors have detailed explanations: E0493, E0716.
10574For more information about an error, try `rustc --explain E0493`.
0 commit comments