File: min_const_fn.stderr

package info (click to toggle)
rustc 1.89.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 906,624 kB
  • sloc: xml: 158,148; python: 34,888; javascript: 19,595; sh: 19,221; ansic: 13,046; cpp: 7,144; asm: 4,376; makefile: 692; lisp: 174; sql: 15
file content (79 lines) | stat: -rw-r--r-- 3,723 bytes parent folder | download | duplicates (14)
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
73
74
75
76
77
78
79
error[E0493]: destructor of `Foo<T>` cannot be evaluated at compile-time
  --> $DIR/min_const_fn.rs:37:25
   |
LL |     const fn into_inner(self) -> T { self.0 }
   |                         ^^^^                - value is dropped here
   |                         |
   |                         the destructor for this type cannot be evaluated in constant functions

error[E0493]: destructor of `Foo<T>` cannot be evaluated at compile-time
  --> $DIR/min_const_fn.rs:43:28
   |
LL |     const fn into_inner_lt(self) -> T { self.0 }
   |                            ^^^^                - value is dropped here
   |                            |
   |                            the destructor for this type cannot be evaluated in constant functions

error[E0493]: destructor of `Foo<T>` cannot be evaluated at compile-time
  --> $DIR/min_const_fn.rs:49:27
   |
LL |     const fn into_inner_s(self) -> T { self.0 }
   |                           ^^^^                - value is dropped here
   |                           |
   |                           the destructor for this type cannot be evaluated in constant functions

error: pointers cannot be cast to integers during const eval
  --> $DIR/min_const_fn.rs:79:42
   |
LL | const fn foo30(x: *const u32) -> usize { x as usize }
   |                                          ^^^^^^^^^^
   |
   = note: at compile-time, pointers do not have an integer value
   = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior

error: pointers cannot be cast to integers during const eval
  --> $DIR/min_const_fn.rs:81:63
   |
LL | const fn foo30_with_unsafe(x: *const u32) -> usize { unsafe { x as usize } }
   |                                                               ^^^^^^^^^^
   |
   = note: at compile-time, pointers do not have an integer value
   = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior

error: pointers cannot be cast to integers during const eval
  --> $DIR/min_const_fn.rs:83:42
   |
LL | const fn foo30_2(x: *mut u32) -> usize { x as usize }
   |                                          ^^^^^^^^^^
   |
   = note: at compile-time, pointers do not have an integer value
   = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior

error: pointers cannot be cast to integers during const eval
  --> $DIR/min_const_fn.rs:85:63
   |
LL | const fn foo30_2_with_unsafe(x: *mut u32) -> usize { unsafe { x as usize } }
   |                                                               ^^^^^^^^^^
   |
   = note: at compile-time, pointers do not have an integer value
   = note: avoiding this restriction via `transmute`, `union`, or raw pointers leads to compile-time undefined behavior

error[E0493]: destructor of `AlanTuring<impl std::fmt::Debug>` cannot be evaluated at compile-time
  --> $DIR/min_const_fn.rs:109:19
   |
LL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}
   |                   ^^                                     - value is dropped here
   |                   |
   |                   the destructor for this type cannot be evaluated in constant functions

error[E0493]: destructor of `impl std::fmt::Debug` cannot be evaluated at compile-time
  --> $DIR/min_const_fn.rs:111:18
   |
LL | const fn no_apit(_x: impl std::fmt::Debug) {}
   |                  ^^                         - value is dropped here
   |                  |
   |                  the destructor for this type cannot be evaluated in constant functions

error: aborting due to 9 previous errors

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