]> git.lizzy.rs Git - rust.git/blob - src/test/ui/static/static-drop-scope.nll.stderr
Fix a few tests with target-specific output
[rust.git] / src / test / ui / static / static-drop-scope.nll.stderr
1 error[E0493]: destructors cannot be evaluated at compile-time
2   --> $DIR/static-drop-scope.rs:19:60
3    |
4 LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
5    |                                                            ^^^^^^^^ statics cannot evaluate destructors
6
7 error[E0716]: temporary value dropped while borrowed
8   --> $DIR/static-drop-scope.rs:19:60
9    |
10 LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
11    |                                                            ^^^^^^^^- temporary value is freed at the end of this statement
12    |                                                            |
13    |                                                            creates a temporary which is freed while still in use
14    |
15    = note: borrowed value must be valid for the static lifetime...
16
17 error[E0493]: destructors cannot be evaluated at compile-time
18   --> $DIR/static-drop-scope.rs:23:59
19    |
20 LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
21    |                                                           ^^^^^^^^ constants cannot evaluate destructors
22
23 error[E0716]: temporary value dropped while borrowed
24   --> $DIR/static-drop-scope.rs:23:59
25    |
26 LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
27    |                                                           ^^^^^^^^- temporary value is freed at the end of this statement
28    |                                                           |
29    |                                                           creates a temporary which is freed while still in use
30    |
31    = note: borrowed value must be valid for the static lifetime...
32
33 error[E0493]: destructors cannot be evaluated at compile-time
34   --> $DIR/static-drop-scope.rs:27:28
35    |
36 LL | static EARLY_DROP_S: i32 = (WithDtor, 0).1;
37    |                            ^^^^^^^^^^^^^ statics cannot evaluate destructors
38
39 error[E0493]: destructors cannot be evaluated at compile-time
40   --> $DIR/static-drop-scope.rs:30:27
41    |
42 LL | const EARLY_DROP_C: i32 = (WithDtor, 0).1;
43    |                           ^^^^^^^^^^^^^ constants cannot evaluate destructors
44
45 error[E0493]: destructors cannot be evaluated at compile-time
46   --> $DIR/static-drop-scope.rs:33:24
47    |
48 LL | const fn const_drop<T>(_: T) {}
49    |                        ^ constant functions cannot evaluate destructors
50
51 error[E0493]: destructors cannot be evaluated at compile-time
52   --> $DIR/static-drop-scope.rs:37:5
53    |
54 LL |     (x, ()).1
55    |     ^^^^^^^ constant functions cannot evaluate destructors
56
57 error: aborting due to 8 previous errors
58
59 Some errors occurred: E0493, E0716.
60 For more information about an error, try `rustc --explain E0493`.