about summary refs log tree commit diff
path: root/tests/ui/consts/promoted_const_call2.stderr
blob: e62458d1a6ae4023f0b9f38f45864544a2684108 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
error[E0716]: temporary value dropped while borrowed
  --> $DIR/promoted_const_call2.rs:4:26
   |
LL |     let _: &'static _ = &id(&String::new());
   |            ----------    ^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
   |            |
   |            type annotation requires that borrow lasts for `'static`
...
LL | };
   | - temporary value is freed at the end of this statement

error[E0716]: temporary value dropped while borrowed
  --> $DIR/promoted_const_call2.rs:4:30
   |
LL |     let _: &'static _ = &id(&String::new());
   |            ----------        ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
   |            |                 |
   |            |                 creates a temporary value which is freed while still in use
   |            type annotation requires that borrow lasts for `'static`

error[E0716]: temporary value dropped while borrowed
  --> $DIR/promoted_const_call2.rs:10:26
   |
LL |     let _: &'static _ = &id(&String::new());
   |            ----------    ^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
   |            |
   |            type annotation requires that borrow lasts for `'static`
...
LL | }
   | - temporary value is freed at the end of this statement

error[E0716]: temporary value dropped while borrowed
  --> $DIR/promoted_const_call2.rs:10:30
   |
LL |     let _: &'static _ = &id(&String::new());
   |            ----------        ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
   |            |                 |
   |            |                 creates a temporary value which is freed while still in use
   |            type annotation requires that borrow lasts for `'static`

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0716`.