Debian Codegraph @

debian/rust-vendor/zerocopy/tests/ui/transmute_mut.stable.stderr

raw
1 error[E0308]: mismatched types
2 --> $DIR/transmute_mut.rs:17:36
3 |
4 17 | const DST_NOT_A_REFERENCE: usize = transmute_mut!(&mut 0u8);
5 | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&mut _`
6 |
7 = note: expected type `usize`
8 found mutable reference `&mut _`
9 = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
10
11 error[E0308]: mismatched types
12 --> $DIR/transmute_mut.rs:17:36
13 |
14 17 | const DST_NOT_A_REFERENCE: usize = transmute_mut!(&mut 0u8);
15 | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&mut _`
16 |
17 = note: expected type `usize`
18 found mutable reference `&mut _`
19 = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
20
21 error[E0277]: the trait bound `DstA: FromBytes` is not satisfied
22 --> $DIR/transmute_mut.rs:30:39
23 |
24 30 | const DST_NOT_FROM_BYTES: &mut DstA = transmute_mut!(&mut SrcA);
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
26 |
27 help: the trait `FromBytes` is not implemented for `DstA`
28 --> $DIR/transmute_mut.rs:27:1
29 |
30 27 | struct DstA;
31 | ^^^^^^^^^^^
32 = note: Consider adding `#[derive(FromBytes)]` to `DstA`
33 = help: the following other types implement trait `FromBytes`:
34 ()
35 (A, B)
36 (A, B, C)
37 (A, B, C, D)
38 (A, B, C, D, E)
39 (A, B, C, D, E, F)
40 (A, B, C, D, E, F, G)
41 (A, B, C, D, E, F, G, H)
42 and 85 others
43 note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
44 --> $WORKSPACE/src/util/macro_util.rs:814:14
45 |
46 811 | pub fn transmute_mut(self) -> &'a mut Dst
47 | ------------- required by a bound in this associated function
48 ...
49 814 | Dst: FromBytes + IntoBytes,
50 | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
51 = note: the full name for the type has been written to '/long-type-HASH.txt'
52 = note: consider using `--verbose` to print the full type name to the console
53 = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
54
55 error[E0277]: the trait bound `DstB: IntoBytes` is not satisfied
56 --> $DIR/transmute_mut.rs:42:37
57 |
58 42 | const DST_NOT_AS_BYTES: &mut DstB = transmute_mut!(&mut SrcB);
59 | ^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
60 |
61 help: the trait `IntoBytes` is not implemented for `DstB`
62 --> $DIR/transmute_mut.rs:39:1
63 |
64 39 | struct DstB;
65 | ^^^^^^^^^^^
66 = note: Consider adding `#[derive(IntoBytes)]` to `DstB`
67 = help: the following other types implement trait `IntoBytes`:
68 ()
69 AU16
70 AtomicBool
71 AtomicI16
72 AtomicI32
73 AtomicI64
74 AtomicI8
75 AtomicIsize
76 and 74 others
77 note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
78 --> $WORKSPACE/src/util/macro_util.rs:814:26
79 |
80 811 | pub fn transmute_mut(self) -> &'a mut Dst
81 | ------------- required by a bound in this associated function
82 ...
83 814 | Dst: FromBytes + IntoBytes,
84 | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
85 = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
86
87 error[E0308]: mismatched types
88 --> $DIR/transmute_mut.rs:47:59
89 |
90 47 | const SRC_DST_NOT_REFERENCES: &mut usize = transmute_mut!(0usize);
91 | ---------------^^^^^^-
92 | | |
93 | | expected `&mut _`, found `usize`
94 | expected due to this
95 |
96 = note: expected mutable reference `&mut _`
97 found type `usize`
98 help: consider mutably borrowing here
99 |
100 47 | const SRC_DST_NOT_REFERENCES: &mut usize = transmute_mut!(&mut 0usize);
101 | ++++
102
103 error[E0308]: mismatched types
104 --> $DIR/transmute_mut.rs:52:37
105 |
106 52 | let _: &mut u8 = transmute_mut!(&0u8);
107 | ---------------^^^^-
108 | | |
109 | | types differ in mutability
110 | expected due to this
111 |
112 = note: expected mutable reference `&mut _`
113 found reference `&u8`
114
115 error[E0308]: mismatched types
116 --> $DIR/transmute_mut.rs:58:53
117 |
118 58 | const SRC_NOT_A_REFERENCE: &mut u8 = transmute_mut!(0usize);
119 | ---------------^^^^^^-
120 | | |
121 | | expected `&mut _`, found `usize`
122 | expected due to this
123 |
124 = note: expected mutable reference `&mut _`
125 found type `usize`
126 help: consider mutably borrowing here
127 |
128 58 | const SRC_NOT_A_REFERENCE: &mut u8 = transmute_mut!(&mut 0usize);
129 | ++++
130
131 error[E0277]: the trait bound `SrcC: FromBytes` is not satisfied
132 --> $DIR/transmute_mut.rs:70:39
133 |
134 70 | const SRC_NOT_FROM_BYTES: &mut DstC = transmute_mut!(&mut SrcC);
135 | ^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
136 |
137 help: the trait `FromBytes` is not implemented for `SrcC`
138 --> $DIR/transmute_mut.rs:63:1
139 |
140 63 | struct SrcC;
141 | ^^^^^^^^^^^
142 = note: Consider adding `#[derive(FromBytes)]` to `SrcC`
143 = help: the following other types implement trait `FromBytes`:
144 ()
145 (A, B)
146 (A, B, C)
147 (A, B, C, D)
148 (A, B, C, D, E)
149 (A, B, C, D, E, F)
150 (A, B, C, D, E, F, G)
151 (A, B, C, D, E, F, G, H)
152 and 85 others
153 note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
154 --> $WORKSPACE/src/util/macro_util.rs:813:14
155 |
156 811 | pub fn transmute_mut(self) -> &'a mut Dst
157 | ------------- required by a bound in this associated function
158 812 | where
159 813 | Src: FromBytes + IntoBytes,
160 | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
161 = note: the full name for the type has been written to '/long-type-HASH.txt'
162 = note: consider using `--verbose` to print the full type name to the console
163 = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
164
165 error[E0277]: the trait bound `SrcD: IntoBytes` is not satisfied
166 --> $DIR/transmute_mut.rs:82:37
167 |
168 82 | const SRC_NOT_AS_BYTES: &mut DstD = transmute_mut!(&mut SrcD);
169 | ^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
170 |
171 help: the trait `IntoBytes` is not implemented for `SrcD`
172 --> $DIR/transmute_mut.rs:75:1
173 |
174 75 | struct SrcD;
175 | ^^^^^^^^^^^
176 = note: Consider adding `#[derive(IntoBytes)]` to `SrcD`
177 = help: the following other types implement trait `IntoBytes`:
178 ()
179 AU16
180 AtomicBool
181 AtomicI16
182 AtomicI32
183 AtomicI64
184 AtomicI8
185 AtomicIsize
186 and 74 others
187 note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
188 --> $WORKSPACE/src/util/macro_util.rs:813:26
189 |
190 811 | pub fn transmute_mut(self) -> &'a mut Dst
191 | ------------- required by a bound in this associated function
192 812 | where
193 813 | Src: FromBytes + IntoBytes,
194 | ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
195 = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
196
197 error[E0599]: the method `transmute_mut` exists for struct `Wrap<&mut [u8], &mut [u8; 1]>`, but its trait bounds were not satisfied
198 --> $DIR/transmute_mut.rs:87:35
199 |
200 87 | const SRC_UNSIZED: &mut [u8; 1] = transmute_mut!(&mut [0u8][..]);
201 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
202 |
203 ::: $WORKSPACE/src/util/macro_util.rs:694:1
204 |
205 694 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
206 | ------------------------- doesn't satisfy `Wrap<&mut [u8], &mut [u8; 1]>: TransmuteMutDst<'_>`
207 |
208 = note: the following trait bounds were not satisfied:
209 `[u8]: Sized`
210 `<[u8; 1] as KnownLayout>::PointerMetadata = usize`
211 which is required by `Wrap<&mut [u8], &mut [u8; 1]>: TransmuteMutDst<'_>`
212 = note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)
213
214 error: aborting due to 10 previous errors
215
216 Some errors have detailed explanations: E0277, E0308, E0599.
217 For more information about an error, try `rustc --explain E0277`.