about summary refs log tree commit diff
path: root/tests/ui/consts/const-eval/ptr-to-int-transmute-in-consts-issue-87525.stderr
blob: 2a9d9b5cb962920d5074cc9de9e8faf628527301 (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
error: pointers cannot be transmuted to integers during const eval
  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:5:9
   |
LL |         std::mem::transmute(ptr)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: at compile-time, pointers do not have an integer value
   = note: avoiding this restriction via `union` or raw pointers leads to compile-time undefined behavior
   = help: for more information, see https://doc.rust-lang.org/std/mem/fn.transmute.html
note: the lint level is defined here
  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:1:9
   |
LL | #![deny(ptr_to_integer_transmute_in_consts)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: pointers cannot be transmuted to integers during const eval
  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:15:13
   |
LL |             std::mem::transmute(ptr)
   |             ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: at compile-time, pointers do not have an integer value
   = note: avoiding this restriction via `union` or raw pointers leads to compile-time undefined behavior
   = help: for more information, see https://doc.rust-lang.org/std/mem/fn.transmute.html

error: pointers cannot be transmuted to integers during const eval
  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:32:13
   |
LL |             std::mem::transmute(ptr)
   |             ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: at compile-time, pointers do not have an integer value
   = note: avoiding this restriction via `union` or raw pointers leads to compile-time undefined behavior
   = help: for more information, see https://doc.rust-lang.org/std/mem/fn.transmute.html

error: pointers cannot be transmuted to integers during const eval
  --> $DIR/ptr-to-int-transmute-in-consts-issue-87525.rs:58:9
   |
LL |         std::mem::transmute(ptr)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: at compile-time, pointers do not have an integer value
   = note: avoiding this restriction via `union` or raw pointers leads to compile-time undefined behavior
   = help: for more information, see https://doc.rust-lang.org/std/mem/fn.transmute.html

error: aborting due to 4 previous errors