]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/promoted_const_call.stderr
Auto merge of #106121 - RalfJung:miri, r=RalfJung
[rust.git] / src / test / ui / consts / promoted_const_call.stderr
1 error[E0716]: temporary value dropped while borrowed
2   --> $DIR/promoted_const_call.rs:7:26
3    |
4 LL |     let _: &'static _ = &id(&Panic);
5    |            ----------    ^^^^^^^^^^ creates a temporary value which is freed while still in use
6    |            |
7    |            type annotation requires that borrow lasts for `'static`
8 ...
9 LL | };
10    | - temporary value is freed at the end of this statement
11
12 error[E0716]: temporary value dropped while borrowed
13   --> $DIR/promoted_const_call.rs:7:30
14    |
15 LL |     let _: &'static _ = &id(&Panic);
16    |            ----------        ^^^^^ - temporary value is freed at the end of this statement
17    |            |                 |
18    |            |                 creates a temporary value which is freed while still in use
19    |            type annotation requires that borrow lasts for `'static`
20
21 error[E0716]: temporary value dropped while borrowed
22   --> $DIR/promoted_const_call.rs:13:26
23    |
24 LL |     let _: &'static _ = &id(&Panic);
25    |            ----------    ^^^^^^^^^^ creates a temporary value which is freed while still in use
26    |            |
27    |            type annotation requires that borrow lasts for `'static`
28 ...
29 LL | }
30    | - temporary value is freed at the end of this statement
31
32 error[E0716]: temporary value dropped while borrowed
33   --> $DIR/promoted_const_call.rs:13:30
34    |
35 LL |     let _: &'static _ = &id(&Panic);
36    |            ----------        ^^^^^ - temporary value is freed at the end of this statement
37    |            |                 |
38    |            |                 creates a temporary value which is freed while still in use
39    |            type annotation requires that borrow lasts for `'static`
40
41 error[E0716]: temporary value dropped while borrowed
42   --> $DIR/promoted_const_call.rs:16:26
43    |
44 LL |     let _: &'static _ = &&(Panic, 0).1;
45    |            ----------    ^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
46    |            |
47    |            type annotation requires that borrow lasts for `'static`
48 ...
49 LL | }
50    | - temporary value is freed at the end of this statement
51
52 error[E0716]: temporary value dropped while borrowed
53   --> $DIR/promoted_const_call.rs:16:27
54    |
55 LL |     let _: &'static _ = &&(Panic, 0).1;
56    |            ----------     ^^^^^^^^^^ creates a temporary value which is freed while still in use
57    |            |
58    |            type annotation requires that borrow lasts for `'static`
59 ...
60 LL | }
61    | - temporary value is freed at the end of this statement
62
63 error: aborting due to 6 previous errors
64
65 For more information about this error, try `rustc --explain E0716`.