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]
@@ -35,13 +43,13 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {}
35
43
pub trait DispatchFromDyn < T > { }
36
44
37
45
// &T -> &U
38
- impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a U > for & ' a T { }
46
+ impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a U > for & ' a T { }
39
47
// &mut T -> &mut U
40
- impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a mut U > for & ' a mut T { }
48
+ impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a mut U > for & ' a mut T { }
41
49
// *const T -> *const U
42
- impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * const U > for * const T { }
50
+ impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * const U > for * const T { }
43
51
// *mut T -> *mut U
44
- impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * mut U > for * mut T { }
52
+ impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * mut U > for * mut T { }
45
53
impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < Box < U , ( ) > > for Box < T , ( ) > { }
46
54
47
55
#[ lang = "legacy_receiver" ]
@@ -52,8 +60,7 @@ impl<T: ?Sized> LegacyReceiver for &mut T {}
52
60
impl < T : ?Sized , A : Allocator > LegacyReceiver for Box < T , A > { }
53
61
54
62
#[ lang = "receiver" ]
55
- trait Receiver {
56
- }
63
+ trait Receiver { }
57
64
58
65
#[ lang = "copy" ]
59
66
pub trait Copy { }
@@ -67,10 +74,13 @@ impl Copy for u16 {}
67
74
impl Copy for u32 { }
68
75
impl Copy for u64 { }
69
76
impl Copy for usize { }
77
+ impl Copy for u128 { }
70
78
impl Copy for i8 { }
71
79
impl Copy for i16 { }
72
80
impl Copy for i32 { }
81
+ impl Copy for i64 { }
73
82
impl Copy for isize { }
83
+ impl Copy for i128 { }
74
84
impl Copy for f32 { }
75
85
impl Copy for f64 { }
76
86
impl Copy for char { }
@@ -336,7 +346,6 @@ impl PartialEq for u32 {
336
346
}
337
347
}
338
348
339
-
340
349
impl PartialEq for u64 {
341
350
fn eq ( & self , other : & u64 ) -> bool {
342
351
( * self ) == ( * other)
@@ -523,7 +532,11 @@ fn panic_in_cleanup() -> ! {
523
532
#[ track_caller]
524
533
fn panic_bounds_check ( index : usize , len : usize ) -> ! {
525
534
unsafe {
526
- 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) ;
535
+ libc:: printf (
536
+ "index out of bounds: the len is %d but the index is %d\n \0 " as * const str as * const i8 ,
537
+ len,
538
+ index,
539
+ ) ;
527
540
intrinsics:: abort ( ) ;
528
541
}
529
542
}
@@ -551,8 +564,7 @@ pub trait Deref {
551
564
fn deref ( & self ) -> & Self :: Target ;
552
565
}
553
566
554
- pub trait Allocator {
555
- }
567
+ pub trait Allocator { }
556
568
557
569
impl Allocator for ( ) { }
558
570
@@ -634,6 +646,8 @@ pub union MaybeUninit<T> {
634
646
}
635
647
636
648
pub mod intrinsics {
649
+ #[ rustc_intrinsic]
650
+ pub const fn black_box < T > ( _dummy : T ) -> T ;
637
651
#[ rustc_intrinsic]
638
652
pub fn abort ( ) -> !;
639
653
#[ rustc_intrinsic]
@@ -711,19 +725,27 @@ pub struct VaList<'a>(&'a mut VaListImpl);
711
725
712
726
#[ rustc_builtin_macro]
713
727
#[ rustc_macro_transparency = "semitransparent" ]
714
- pub macro stringify( $( $t: tt) * ) { /* compiler built-in */ }
728
+ pub macro stringify( $( $t: tt) * ) {
729
+ /* compiler built-in */
730
+ }
715
731
716
732
#[ rustc_builtin_macro]
717
733
#[ rustc_macro_transparency = "semitransparent" ]
718
- pub macro file ( ) { /* compiler built-in */ }
734
+ pub macro file ( ) {
735
+ /* compiler built-in */
736
+ }
719
737
720
738
#[ rustc_builtin_macro]
721
739
#[ rustc_macro_transparency = "semitransparent" ]
722
- pub macro line ( ) { /* compiler built-in */ }
740
+ pub macro line ( ) {
741
+ /* compiler built-in */
742
+ }
723
743
724
744
#[ rustc_builtin_macro]
725
745
#[ rustc_macro_transparency = "semitransparent" ]
726
- pub macro cfg ( ) { /* compiler built-in */ }
746
+ pub macro cfg ( ) {
747
+ /* compiler built-in */
748
+ }
727
749
728
750
pub static A_STATIC : u8 = 42 ;
729
751
0 commit comments