11#![ feature(
2- no_core, lang_items, intrinsics, unboxed_closures, extern_types,
3- decl_macro, rustc_attrs, transparent_unions, auto_traits, freeze_impls,
2+ no_core,
3+ lang_items,
4+ intrinsics,
5+ unboxed_closures,
6+ extern_types,
7+ decl_macro,
8+ rustc_attrs,
9+ transparent_unions,
10+ auto_traits,
11+ freeze_impls,
412 thread_local
513) ]
614#![ no_core]
@@ -26,6 +34,13 @@ pub trait Unsize<T: ?Sized> {}
2634#[ lang = "coerce_unsized" ]
2735pub trait CoerceUnsized < T > { }
2836
37+ #[ lang = "coerce_pointee_validated" ]
38+ pub trait CoercePointeeValidated {
39+ /* compiler built-in */
40+ #[ lang = "coerce_pointee_validated_pointee" ]
41+ type Pointee : ?Sized ;
42+ }
43+
2944impl < ' a , ' b : ' a , T : ?Sized + Unsize < U > , U : ?Sized > CoerceUnsized < & ' a U > for & ' b T { }
3045impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > CoerceUnsized < & ' a mut U > for & ' a mut T { }
3146impl < T : ?Sized + Unsize < U > , U : ?Sized > CoerceUnsized < * const U > for * const T { }
@@ -35,13 +50,13 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {}
3550pub trait DispatchFromDyn < T > { }
3651
3752// &T -> &U
38- impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a U > for & ' a T { }
53+ impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a U > for & ' a T { }
3954// &mut T -> &mut U
40- impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a mut U > for & ' a mut T { }
55+ impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a mut U > for & ' a mut T { }
4156// *const T -> *const U
42- impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * const U > for * const T { }
57+ impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * const U > for * const T { }
4358// *mut T -> *mut U
44- impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * mut U > for * mut T { }
59+ impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * mut U > for * mut T { }
4560impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < Box < U , ( ) > > for Box < T , ( ) > { }
4661
4762#[ lang = "legacy_receiver" ]
@@ -289,7 +304,6 @@ impl PartialEq for u32 {
289304 }
290305}
291306
292-
293307impl PartialEq for u64 {
294308 fn eq ( & self , other : & u64 ) -> bool {
295309 ( * self ) == ( * other)
@@ -476,7 +490,11 @@ fn panic_in_cleanup() -> ! {
476490#[ track_caller]
477491fn panic_bounds_check ( index : usize , len : usize ) -> ! {
478492 unsafe {
479- libc:: printf ( "index out of bounds: the len is %d but the index is %d\n \0 " as * const str as * const i8 , len, index) ;
493+ libc:: printf (
494+ "index out of bounds: the len is %d but the index is %d\n \0 " as * const str as * const i8 ,
495+ len,
496+ index,
497+ ) ;
480498 intrinsics:: abort ( ) ;
481499 }
482500}
@@ -504,8 +522,7 @@ pub trait Deref {
504522 fn deref ( & self ) -> & Self :: Target ;
505523}
506524
507- pub trait Allocator {
508- }
525+ pub trait Allocator { }
509526
510527impl Allocator for ( ) { }
511528
@@ -699,19 +716,27 @@ pub struct VaList<'a>(&'a mut VaListImpl);
699716
700717#[ rustc_builtin_macro]
701718#[ rustc_macro_transparency = "semitransparent" ]
702- pub macro stringify( $( $t: tt) * ) { /* compiler built-in */ }
719+ pub macro stringify( $( $t: tt) * ) {
720+ /* compiler built-in */
721+ }
703722
704723#[ rustc_builtin_macro]
705724#[ rustc_macro_transparency = "semitransparent" ]
706- pub macro file ( ) { /* compiler built-in */ }
725+ pub macro file ( ) {
726+ /* compiler built-in */
727+ }
707728
708729#[ rustc_builtin_macro]
709730#[ rustc_macro_transparency = "semitransparent" ]
710- pub macro line ( ) { /* compiler built-in */ }
731+ pub macro line ( ) {
732+ /* compiler built-in */
733+ }
711734
712735#[ rustc_builtin_macro]
713736#[ rustc_macro_transparency = "semitransparent" ]
714- pub macro cfg ( ) { /* compiler built-in */ }
737+ pub macro cfg ( ) {
738+ /* compiler built-in */
739+ }
715740
716741pub static A_STATIC : u8 = 42 ;
717742
0 commit comments