@@ -367,6 +367,61 @@ impl ::core::cmp::Ord for Big {
367
367
}
368
368
}
369
369
370
+ // A struct with an unsized field. Some derives are not usable in this case.
371
+ struct Unsized([u32]);
372
+ #[automatically_derived]
373
+ #[allow(unused_qualifications)]
374
+ impl ::core::fmt::Debug for Unsized {
375
+ fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
376
+ ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Unsized",
377
+ &&self.0)
378
+ }
379
+ }
380
+ #[automatically_derived]
381
+ #[allow(unused_qualifications)]
382
+ impl ::core::hash::Hash for Unsized {
383
+ fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
384
+ ::core::hash::Hash::hash(&self.0, state)
385
+ }
386
+ }
387
+ impl ::core::marker::StructuralPartialEq for Unsized {}
388
+ #[automatically_derived]
389
+ #[allow(unused_qualifications)]
390
+ impl ::core::cmp::PartialEq for Unsized {
391
+ #[inline]
392
+ fn eq(&self, other: &Unsized) -> bool { self.0 == other.0 }
393
+ #[inline]
394
+ fn ne(&self, other: &Unsized) -> bool { self.0 != other.0 }
395
+ }
396
+ impl ::core::marker::StructuralEq for Unsized {}
397
+ #[automatically_derived]
398
+ #[allow(unused_qualifications)]
399
+ impl ::core::cmp::Eq for Unsized {
400
+ #[inline]
401
+ #[doc(hidden)]
402
+ #[no_coverage]
403
+ fn assert_receiver_is_total_eq(&self) -> () {
404
+ let _: ::core::cmp::AssertParamIsEq<[u32]>;
405
+ }
406
+ }
407
+ #[automatically_derived]
408
+ #[allow(unused_qualifications)]
409
+ impl ::core::cmp::PartialOrd for Unsized {
410
+ #[inline]
411
+ fn partial_cmp(&self, other: &Unsized)
412
+ -> ::core::option::Option<::core::cmp::Ordering> {
413
+ ::core::cmp::PartialOrd::partial_cmp(&self.0, &other.0)
414
+ }
415
+ }
416
+ #[automatically_derived]
417
+ #[allow(unused_qualifications)]
418
+ impl ::core::cmp::Ord for Unsized {
419
+ #[inline]
420
+ fn cmp(&self, other: &Unsized) -> ::core::cmp::Ordering {
421
+ ::core::cmp::Ord::cmp(&self.0, &other.0)
422
+ }
423
+ }
424
+
370
425
// A packed tuple struct.
371
426
#[repr(packed)]
372
427
struct Packed(u32);
0 commit comments