File: transmute-fail.stderr

package info (click to toggle)
rustc-web 1.85.0%2Bdfsg3-1~deb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,759,988 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,056; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (132 lines) | stat: -rw-r--r-- 5,557 bytes parent folder | download | duplicates (3)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
error: the constant `W` is not of type `usize`
  --> $DIR/transmute-fail.rs:16:42
   |
LL | fn bar<const W: bool, const H: usize>(v: [[u32; H]; W]) -> [[u32; W]; H] {
   |                                          ^^^^^^^^^^^^^ expected `usize`, found `bool`

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:11:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[[u32; H + 1]; W]` (size can vary because of [u32; H + 1])
   = note: target type: `[[u32; W + 1]; H]` (size can vary because of [u32; W + 1])

error: the constant `W` is not of type `usize`
  --> $DIR/transmute-fail.rs:19:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^ expected `usize`, found `bool`

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:26:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[[u32; H]; W]` (size can vary because of [u32; H])
   = note: target type: `[u32; W * H * H]` (this type does not have a fixed size)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:33:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[[[u32; 8888888]; 9999999]; 777777777]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)
   = note: target type: `[[[u32; 9999999]; 777777777]; 8888888]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:39:14
   |
LL |     unsafe { std::mem::transmute(v) }
   |              ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[[[u32; 8888888]; 9999999]; 777777777]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)
   = note: target type: `[[[u32; 9999999]; 777777777]; 239]` (values of the type $REALLY_TOO_BIG are too big for the target architecture)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:45:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[[u32; H]; W]` (size can vary because of [u32; H])
   = note: target type: `[[u32; W]; H]` (size can vary because of [u32; W])

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:56:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[[u32; H]; W]` (size can vary because of [u32; H])
   = note: target type: `[u32; W * H]` (this type does not have a fixed size)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:63:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[u32; H * W]` (this type does not have a fixed size)
   = note: target type: `[[u32; W]; H]` (size can vary because of [u32; W])

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:72:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[[[u32; D]; H]; W]` (size can vary because of [u32; D])
   = note: target type: `[u32; D * W * H]` (this type does not have a fixed size)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:81:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[[[u32; D]; H]; W]` (size can vary because of [u32; D])
   = note: target type: `[[u32; D * W]; H]` (size can vary because of [u32; D * W])

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:88:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[u16; L]` (this type does not have a fixed size)
   = note: target type: `[u8; L * 2]` (this type does not have a fixed size)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:95:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[u8; L * 2]` (this type does not have a fixed size)
   = note: target type: `[u16; L]` (this type does not have a fixed size)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:102:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[u8; L]` (this type does not have a fixed size)
   = note: target type: `[[u8; 1]; L]` (this type does not have a fixed size)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> $DIR/transmute-fail.rs:111:9
   |
LL |         std::mem::transmute(v)
   |         ^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `[[u32; 2 * H]; W + W]` (size can vary because of [u32; 2 * H])
   = note: target type: `[[u32; W + W]; 2 * H]` (size can vary because of [u32; W + W])

error: aborting due to 15 previous errors

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