about summary refs log tree commit diff
path: root/tests/ui/static/static-drop-scope.stderr
blob: 0fdf081e23432a1a2127c3df1c80ade83c38ff99 (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
error[E0493]: destructor of `(WithDtor, i32)` cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:7:28
   |
LL | static EARLY_DROP_S: i32 = (WithDtor, 0).1;
   |                            ^^^^^^^^^^^^^ - value is dropped here
   |                            |
   |                            the destructor for this type cannot be evaluated in statics

error[E0493]: destructor of `(WithDtor, i32)` cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:10:27
   |
LL | const EARLY_DROP_C: i32 = (WithDtor, 0).1;
   |                           ^^^^^^^^^^^^^ - value is dropped here
   |                           |
   |                           the destructor for this type cannot be evaluated in constants

error[E0493]: destructor of `(Option<WithDtor>, i32)` cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:21:34
   |
LL | const EARLY_DROP_C_OPTION: i32 = (Some(WithDtor), 0).1;
   |                                  ^^^^^^^^^^^^^^^^^^^ - value is dropped here
   |                                  |
   |                                  the destructor for this type cannot be evaluated in constants

error[E0493]: destructor of `(Option<WithDtor>, i32)` cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:26:43
   |
LL | const EARLY_DROP_C_OPTION_CONSTANT: i32 = (HELPER, 0).1;
   |                                           ^^^^^^^^^^^ - value is dropped here
   |                                           |
   |                                           the destructor for this type cannot be evaluated in constants

error[E0493]: destructor of `T` cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:13:24
   |
LL | const fn const_drop<T>(_: T) {}
   |                        ^      - value is dropped here
   |                        |
   |                        the destructor for this type cannot be evaluated in constant functions

error[E0493]: destructor of `(T, ())` cannot be evaluated at compile-time
  --> $DIR/static-drop-scope.rs:17:5
   |
LL |     (x, ()).1
   |     ^^^^^^^ the destructor for this type cannot be evaluated in constant functions
LL |
LL | }
   | - value is dropped here

error: aborting due to 6 previous errors

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