summary refs log tree commit diff
path: root/src/test/ui/static/static-drop-scope.stderr
blob: 3e3032eb4fb60b4b6082b112538b60a73ccfc82c (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
error[E0493]: destructors cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:9:60
   |
LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
   |                                                            ^^^^^^^^ statics cannot evaluate destructors

error[E0597]: borrowed value does not live long enough
  --> $DIR/static-drop-scope.rs:9:60
   |
LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
   |                                                            ^^^^^^^^- temporary value only lives until here
   |                                                            |
   |                                                            temporary value does not live long enough
   |
   = note: borrowed value must be valid for the static lifetime...

error[E0493]: destructors cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:13:59
   |
LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
   |                                                           ^^^^^^^^ constants cannot evaluate destructors

error[E0597]: borrowed value does not live long enough
  --> $DIR/static-drop-scope.rs:13:59
   |
LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
   |                                                           ^^^^^^^^- temporary value only lives until here
   |                                                           |
   |                                                           temporary value does not live long enough
   |
   = note: borrowed value must be valid for the static lifetime...

error[E0493]: destructors cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:17:28
   |
LL | static EARLY_DROP_S: i32 = (WithDtor, 0).1;
   |                            ^^^^^^^^^^^^^ statics cannot evaluate destructors

error[E0493]: destructors cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:20:27
   |
LL | const EARLY_DROP_C: i32 = (WithDtor, 0).1;
   |                           ^^^^^^^^^^^^^ constants cannot evaluate destructors

error[E0493]: destructors cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:23:24
   |
LL | const fn const_drop<T>(_: T) {}
   |                        ^ constant functions cannot evaluate destructors

error[E0493]: destructors cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:27:5
   |
LL |     (x, ()).1
   |     ^^^^^^^ constant functions cannot evaluate destructors

error[E0493]: destructors cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:31:34
   |
LL | const EARLY_DROP_C_OPTION: i32 = (Some(WithDtor), 0).1;
   |                                  ^^^^^^^^^^^^^^^^^^^ constants cannot evaluate destructors

error[E0493]: destructors cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:36:43
   |
LL | const EARLY_DROP_C_OPTION_CONSTANT: i32 = (HELPER, 0).1;
   |                                           ^^^^^^^^^^^ constants cannot evaluate destructors

error: aborting due to 10 previous errors

Some errors occurred: E0493, E0597.
For more information about an error, try `rustc --explain E0493`.