Debian Codegraph @

debian/rust-vendor/zerocopy/tests/ui/transmute_ref.msrv.stderr

raw
1 error[E0308]: mismatched types
2 --> $DIR/transmute_ref.rs:29:36
3 |
4 29 | const DST_NOT_A_REFERENCE: usize = transmute_ref!(&0u8);
5 | ^^^^^^^^^^^^^^^^^^^^ expected `usize`, found reference
6 |
7 = note: expected type `usize`
8 found reference `&_`
9 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
10
11 error[E0308]: mismatched types
12 --> $DIR/transmute_ref.rs:29:36
13 |
14 29 | const DST_NOT_A_REFERENCE: usize = transmute_ref!(&0u8);
15 | ^^^^^^^^^^^^^^^^^^^^ expected `usize`, found reference
16 |
17 = note: expected type `usize`
18 found reference `&_`
19 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
20
21 error[E0308]: mismatched types
22 --> $DIR/transmute_ref.rs:29:36
23 |
24 29 | const DST_NOT_A_REFERENCE: usize = transmute_ref!(&0u8);
25 | ^^^^^^^^^^^^^^^^^^^^ expected `usize`, found reference
26 |
27 = note: expected type `usize`
28 found reference `&_`
29 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
30
31 error[E0308]: mismatched types
32 --> $DIR/transmute_ref.rs:29:36
33 |
34 29 | const DST_NOT_A_REFERENCE: usize = transmute_ref!(&0u8);
35 | ^^^^^^^^^^^^^^^^^^^^ expected `usize`, found reference
36 |
37 = note: expected type `usize`
38 found reference `&_`
39 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
40
41 error[E0277]: the trait bound `DstA: FromBytes` is not satisfied
42 --> $DIR/transmute_ref.rs:40:35
43 |
44 40 | const DST_NOT_FROM_BYTES: &DstA = transmute_ref!(&AU16(0));
45 | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromBytes` is not implemented for `DstA`
46 |
47 note: required by `DST_NOT_FROM_BYTES::AssertDstIsFromBytes`
48 --> $DIR/transmute_ref.rs:40:35
49 |
50 40 | const DST_NOT_FROM_BYTES: &DstA = transmute_ref!(&AU16(0));
51 | ^^^^^^^^^^^^^^^^^^^^^^^^
52 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
53
54 error[E0277]: the trait bound `DstB: Immutable` is not satisfied
55 --> $DIR/transmute_ref.rs:48:34
56 |
57 48 | const DST_NOT_IMMUTABLE: &DstB = transmute_ref!(&AU16(0));
58 | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Immutable` is not implemented for `DstB`
59 |
60 note: required by `DST_NOT_IMMUTABLE::AssertDstIsImmutable`
61 --> $DIR/transmute_ref.rs:48:34
62 |
63 48 | const DST_NOT_IMMUTABLE: &DstB = transmute_ref!(&AU16(0));
64 | ^^^^^^^^^^^^^^^^^^^^^^^^
65 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
66
67 error[E0308]: mismatched types
68 --> $DIR/transmute_ref.rs:53:54
69 |
70 53 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
71 | ---------------^^^^^^-
72 | | |
73 | | expected reference, found `usize`
74 | | help: consider borrowing here: `&0usize`
75 | expected due to this
76 |
77 = note: expected reference `&_`
78 found type `usize`
79
80 error[E0308]: mismatched types
81 --> $DIR/transmute_ref.rs:53:39
82 |
83 53 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
84 | ^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found reference
85 |
86 = note: expected type `usize`
87 found reference `&_`
88 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
89
90 error[E0308]: mismatched types
91 --> $DIR/transmute_ref.rs:53:39
92 |
93 53 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
94 | ^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found reference
95 |
96 = note: expected type `usize`
97 found reference `&_`
98 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
99
100 error[E0308]: mismatched types
101 --> $DIR/transmute_ref.rs:53:39
102 |
103 53 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
104 | ^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found reference
105 |
106 = note: expected type `usize`
107 found reference `&_`
108 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
109
110 error[E0308]: mismatched types
111 --> $DIR/transmute_ref.rs:53:39
112 |
113 53 | const SRC_DST_NOT_REFERENCES: usize = transmute_ref!(0usize);
114 | ^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found reference
115 |
116 = note: expected type `usize`
117 found reference `&_`
118 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
119
120 error[E0308]: mismatched types
121 --> $DIR/transmute_ref.rs:62:49
122 |
123 62 | const SRC_NOT_A_REFERENCE: &u8 = transmute_ref!(0usize);
124 | ---------------^^^^^^-
125 | | |
126 | | expected reference, found `usize`
127 | | help: consider borrowing here: `&0usize`
128 | expected due to this
129 |
130 = note: expected reference `&_`
131 found type `usize`
132
133 error[E0277]: the trait bound `SrcA: IntoBytes` is not satisfied
134 --> $DIR/transmute_ref.rs:70:33
135 |
136 70 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&SrcA(AU16(0)));
137 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoBytes` is not implemented for `SrcA`
138 |
139 note: required by `SRC_NOT_AS_BYTES::AssertSrcIsIntoBytes`
140 --> $DIR/transmute_ref.rs:70:33
141 |
142 70 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&SrcA(AU16(0)));
143 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
144 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
145
146 error[E0277]: the trait bound `SrcA: IntoBytes` is not satisfied
147 --> $DIR/transmute_ref.rs:70:33
148 |
149 70 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&SrcA(AU16(0)));
150 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoBytes` is not implemented for `SrcA`
151 |
152 note: required by a bound in `SRC_NOT_AS_BYTES::AssertSrcIsIntoBytes`
153 --> $DIR/transmute_ref.rs:70:33
154 |
155 70 | const SRC_NOT_AS_BYTES: &AU16 = transmute_ref!(&SrcA(AU16(0)));
156 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `SRC_NOT_AS_BYTES::AssertSrcIsIntoBytes`
157 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
158
159 error[E0277]: the trait bound `SrcB: Immutable` is not satisfied
160 --> $DIR/transmute_ref.rs:79:34
161 |
162 79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0)));
163 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an implementor of trait `Immutable`
164 |
165 note: required by `SRC_NOT_IMMUTABLE::AssertSrcIsImmutable`
166 --> $DIR/transmute_ref.rs:79:34
167 |
168 79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0)));
169 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
170 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
171
172 error[E0277]: the trait bound `SrcB: Immutable` is not satisfied
173 --> $DIR/transmute_ref.rs:79:34
174 |
175 79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0)));
176 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Immutable` is not implemented for `SrcB`
177 |
178 note: required by a bound in `SRC_NOT_IMMUTABLE::AssertSrcIsImmutable`
179 --> $DIR/transmute_ref.rs:79:34
180 |
181 79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0)));
182 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `SRC_NOT_IMMUTABLE::AssertSrcIsImmutable`
183 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
184
185 error[E0599]: the method `transmute_ref` exists for struct `Wrap<&[u8], &[u8; 1]>`, but its trait bounds were not satisfied
186 --> $DIR/transmute_ref.rs:84:31
187 |
188 84 | const SRC_UNSIZED: &[u8; 1] = transmute_ref!(&[0u8][..]);
189 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `Wrap<&[u8], &[u8; 1]>` due to unsatisfied trait bounds
190 |
191 ::: $WORKSPACE/src/util/macro_util.rs:694:1
192 |
193 694 | pub struct Wrap<Src, Dst>(pub Src, pub PhantomData<Dst>);
194 | --------------------------------------------------------- doesn't satisfy `Wrap<&[u8], &[u8; 1]>: TransmuteRefDst`
195 |
196 = note: the following trait bounds were not satisfied:
197 `[u8]: Sized`
198 `<[u8; 1] as KnownLayout>::PointerMetadata = usize`
199 which is required by `Wrap<&[u8], &[u8; 1]>: TransmuteRefDst`
200 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
201
202 error[E0308]: mismatched types
203 --> $DIR/transmute_ref.rs:20:22
204 |
205 20 | let _: &mut u8 = transmute_ref!(&0u8);
206 | ^^^^^^^^^^^^^^^^^^^^ types differ in mutability
207 |
208 = note: expected mutable reference `&mut u8`
209 found reference `&_`
210 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
211
212 error[E0308]: mismatched types
213 --> $DIR/transmute_ref.rs:20:22
214 |
215 20 | let _: &mut u8 = transmute_ref!(&0u8);
216 | ^^^^^^^^^^^^^^^^^^^^ types differ in mutability
217 |
218 = note: expected mutable reference `&mut u8`
219 found reference `&_`
220 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
221
222 error[E0308]: mismatched types
223 --> $DIR/transmute_ref.rs:20:22
224 |
225 20 | let _: &mut u8 = transmute_ref!(&0u8);
226 | ^^^^^^^^^^^^^^^^^^^^ types differ in mutability
227 |
228 = note: expected mutable reference `&mut u8`
229 found reference `&_`
230 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
231
232 error[E0308]: mismatched types
233 --> $DIR/transmute_ref.rs:20:22
234 |
235 20 | let _: &mut u8 = transmute_ref!(&0u8);
236 | ^^^^^^^^^^^^^^^^^^^^ types differ in mutability
237 |
238 = note: expected mutable reference `&mut u8`
239 found reference `&_`
240 = note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)
241
242 error: aborting due to 21 previous errors
243
244 Some errors have detailed explanations: E0277, E0308, E0599.
245 For more information about an error, try `rustc --explain E0277`.