]> git.proxmox.com Git - rustc.git/blob - tests/ui/consts/promoted_const_call5.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / consts / promoted_const_call5.stderr
1 error[E0493]: destructor of `String` cannot be evaluated at compile-time
2 --> $DIR/promoted_const_call5.rs:26:30
3 |
4 LL | let _: &'static _ = &id(&new_string());
5 | ^^^^^^^^^^^^ - value is dropped here
6 | |
7 | the destructor for this type cannot be evaluated in constants
8
9 error[E0716]: temporary value dropped while borrowed
10 --> $DIR/promoted_const_call5.rs:26:26
11 |
12 LL | let _: &'static _ = &id(&new_string());
13 | ---------- ^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
14 | |
15 | type annotation requires that borrow lasts for `'static`
16 ...
17 LL | };
18 | - temporary value is freed at the end of this statement
19
20 error[E0716]: temporary value dropped while borrowed
21 --> $DIR/promoted_const_call5.rs:26:30
22 |
23 LL | let _: &'static _ = &id(&new_string());
24 | ----^^^^^^^^^^^^-- temporary value is freed at the end of this statement
25 | | |
26 | | creates a temporary value which is freed while still in use
27 | argument requires that borrow lasts for `'static`
28
29 error[E0716]: temporary value dropped while borrowed
30 --> $DIR/promoted_const_call5.rs:31:26
31 |
32 LL | let _: &'static _ = &new_manually_drop(new_string());
33 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
34 | |
35 | type annotation requires that borrow lasts for `'static`
36 LL |
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_call5.rs:36:26
42 |
43 LL | let _: &'static _ = &id(&new_string());
44 | ---------- ^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
45 | |
46 | type annotation requires that borrow lasts for `'static`
47 ...
48 LL | }
49 | - temporary value is freed at the end of this statement
50
51 error[E0716]: temporary value dropped while borrowed
52 --> $DIR/promoted_const_call5.rs:36:30
53 |
54 LL | let _: &'static _ = &id(&new_string());
55 | ----^^^^^^^^^^^^-- temporary value is freed at the end of this statement
56 | | |
57 | | creates a temporary value which is freed while still in use
58 | argument requires that borrow lasts for `'static`
59
60 error[E0716]: temporary value dropped while borrowed
61 --> $DIR/promoted_const_call5.rs:40:26
62 |
63 LL | let _: &'static _ = &new_manually_drop(new_string());
64 | ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
65 | |
66 | type annotation requires that borrow lasts for `'static`
67 LL |
68 LL | }
69 | - temporary value is freed at the end of this statement
70
71 error: aborting due to 7 previous errors
72
73 Some errors have detailed explanations: E0493, E0716.
74 For more information about an error, try `rustc --explain E0493`.