1
1
#![ 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,
4
12
thread_local
5
13
) ]
6
14
#![ no_core]
@@ -26,6 +34,13 @@ pub trait Unsize<T: ?Sized> {}
26
34
#[ lang = "coerce_unsized" ]
27
35
pub trait CoerceUnsized < T > { }
28
36
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
+
29
44
impl < ' a , ' b : ' a , T : ?Sized + Unsize < U > , U : ?Sized > CoerceUnsized < & ' a U > for & ' b T { }
30
45
impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > CoerceUnsized < & ' a mut U > for & ' a mut T { }
31
46
impl < 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 {}
35
50
pub trait DispatchFromDyn < T > { }
36
51
37
52
// &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 { }
39
54
// &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 { }
41
56
// *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 { }
43
58
// *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 { }
45
60
impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < Box < U , ( ) > > for Box < T , ( ) > { }
46
61
47
62
#[ lang = "legacy_receiver" ]
@@ -289,7 +304,6 @@ impl PartialEq for u32 {
289
304
}
290
305
}
291
306
292
-
293
307
impl PartialEq for u64 {
294
308
fn eq ( & self , other : & u64 ) -> bool {
295
309
( * self ) == ( * other)
@@ -476,7 +490,11 @@ fn panic_in_cleanup() -> ! {
476
490
#[ track_caller]
477
491
fn panic_bounds_check ( index : usize , len : usize ) -> ! {
478
492
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
+ ) ;
480
498
intrinsics:: abort ( ) ;
481
499
}
482
500
}
@@ -504,8 +522,7 @@ pub trait Deref {
504
522
fn deref ( & self ) -> & Self :: Target ;
505
523
}
506
524
507
- pub trait Allocator {
508
- }
525
+ pub trait Allocator { }
509
526
510
527
impl Allocator for ( ) { }
511
528
@@ -699,19 +716,27 @@ pub struct VaList<'a>(&'a mut VaListImpl);
699
716
700
717
#[ rustc_builtin_macro]
701
718
#[ rustc_macro_transparency = "semitransparent" ]
702
- pub macro stringify( $( $t: tt) * ) { /* compiler built-in */ }
719
+ pub macro stringify( $( $t: tt) * ) {
720
+ /* compiler built-in */
721
+ }
703
722
704
723
#[ rustc_builtin_macro]
705
724
#[ rustc_macro_transparency = "semitransparent" ]
706
- pub macro file ( ) { /* compiler built-in */ }
725
+ pub macro file ( ) {
726
+ /* compiler built-in */
727
+ }
707
728
708
729
#[ rustc_builtin_macro]
709
730
#[ rustc_macro_transparency = "semitransparent" ]
710
- pub macro line ( ) { /* compiler built-in */ }
731
+ pub macro line ( ) {
732
+ /* compiler built-in */
733
+ }
711
734
712
735
#[ rustc_builtin_macro]
713
736
#[ rustc_macro_transparency = "semitransparent" ]
714
- pub macro cfg ( ) { /* compiler built-in */ }
737
+ pub macro cfg ( ) {
738
+ /* compiler built-in */
739
+ }
715
740
716
741
pub static A_STATIC : u8 = 42 ;
717
742
0 commit comments