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