fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.1 KiB74 linesraw
1error[E0493]: destructor of `String` cannot be evaluated at compile-time
2  --> $DIR/promoted_const_call5.rs:26:30
3   |
4LL |     let _: &'static _ = &id(&new_string());
5   |                              ^^^^^^^^^^^^ - value is dropped here
6   |                              |
7   |                              the destructor for this type cannot be evaluated in constants
8
9error[E0716]: temporary value dropped while borrowed
10  --> $DIR/promoted_const_call5.rs:26:26
11   |
12LL |     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...
17LL | };
18   | - temporary value is freed at the end of this statement
19
20error[E0716]: temporary value dropped while borrowed
21  --> $DIR/promoted_const_call5.rs:26:30
22   |
23LL |     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
29error[E0716]: temporary value dropped while borrowed
30  --> $DIR/promoted_const_call5.rs:31:26
31   |
32LL |     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`
36LL |
37LL | };
38   | - temporary value is freed at the end of this statement
39
40error[E0716]: temporary value dropped while borrowed
41  --> $DIR/promoted_const_call5.rs:36:26
42   |
43LL |     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...
48LL | }
49   | - temporary value is freed at the end of this statement
50
51error[E0716]: temporary value dropped while borrowed
52  --> $DIR/promoted_const_call5.rs:36:30
53   |
54LL |     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
60error[E0716]: temporary value dropped while borrowed
61  --> $DIR/promoted_const_call5.rs:40:26
62   |
63LL |     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`
67LL |
68LL | }
69   | - temporary value is freed at the end of this statement
70
71error: aborting due to 7 previous errors
72
73Some errors have detailed explanations: E0493, E0716.
74For more information about an error, try `rustc --explain E0493`.