@@ -37,13 +37,13 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {}
37
37
pub trait DispatchFromDyn < T > { }
38
38
39
39
// &T -> &U
40
- impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a U > for & ' a T { }
40
+ impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a U > for & ' a T { }
41
41
// &mut T -> &mut U
42
- impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a mut U > for & ' a mut T { }
42
+ impl < ' a , T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < & ' a mut U > for & ' a mut T { }
43
43
// *const T -> *const U
44
- impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * const U > for * const T { }
44
+ impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * const U > for * const T { }
45
45
// *mut T -> *mut U
46
- impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * mut U > for * mut T { }
46
+ impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < * mut U > for * mut T { }
47
47
impl < T : ?Sized + Unsize < U > , U : ?Sized > DispatchFromDyn < Box < U > > for Box < T > { }
48
48
49
49
#[ lang = "receiver" ]
@@ -288,7 +288,6 @@ impl PartialEq for u32 {
288
288
}
289
289
}
290
290
291
-
292
291
impl PartialEq for u64 {
293
292
fn eq ( & self , other : & u64 ) -> bool {
294
293
( * self ) == ( * other)
@@ -361,7 +360,7 @@ impl<T: ?Sized> PartialEq for *const T {
361
360
}
362
361
}
363
362
364
- impl < T : PartialEq > PartialEq for Option < T > {
363
+ impl < T : PartialEq > PartialEq for Option < T > {
365
364
fn eq ( & self , other : & Self ) -> bool {
366
365
match ( self , other) {
367
366
( Some ( lhs) , Some ( rhs) ) => * lhs == * rhs,
@@ -472,7 +471,11 @@ pub fn panic(_msg: &'static str) -> ! {
472
471
#[ track_caller]
473
472
fn panic_bounds_check ( index : usize , len : usize ) -> ! {
474
473
unsafe {
475
- 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) ;
474
+ libc:: printf (
475
+ "index out of bounds: the len is %d but the index is %d\n \0 " as * const str as * const i8 ,
476
+ len,
477
+ index,
478
+ ) ;
476
479
intrinsics:: abort ( ) ;
477
480
}
478
481
}
@@ -599,7 +602,7 @@ pub mod libc {
599
602
// functions. legacy_stdio_definitions.lib which provides the printf wrapper functions as normal
600
603
// symbols to link against.
601
604
#[ cfg_attr( unix, link( name = "c" ) ) ]
602
- #[ cfg_attr( target_env= "msvc" , link( name= "legacy_stdio_definitions" ) ) ]
605
+ #[ cfg_attr( target_env = "msvc" , link( name = "legacy_stdio_definitions" ) ) ]
603
606
extern "C" {
604
607
pub fn printf ( format : * const i8 , ...) -> i32 ;
605
608
}
@@ -638,7 +641,7 @@ impl<T> Index<usize> for [T] {
638
641
}
639
642
}
640
643
641
- extern {
644
+ extern "C" {
642
645
type VaListImpl ;
643
646
}
644
647
@@ -648,23 +651,33 @@ pub struct VaList<'a>(&'a mut VaListImpl);
648
651
649
652
#[ rustc_builtin_macro]
650
653
#[ rustc_macro_transparency = "semitransparent" ]
651
- pub macro stringify( $( $t: tt) * ) { /* compiler built-in */ }
654
+ pub macro stringify( $( $t: tt) * ) {
655
+ /* compiler built-in */
656
+ }
652
657
653
658
#[ rustc_builtin_macro]
654
659
#[ rustc_macro_transparency = "semitransparent" ]
655
- pub macro file ( ) { /* compiler built-in */ }
660
+ pub macro file ( ) {
661
+ /* compiler built-in */
662
+ }
656
663
657
664
#[ rustc_builtin_macro]
658
665
#[ rustc_macro_transparency = "semitransparent" ]
659
- pub macro line ( ) { /* compiler built-in */ }
666
+ pub macro line ( ) {
667
+ /* compiler built-in */
668
+ }
660
669
661
670
#[ rustc_builtin_macro]
662
671
#[ rustc_macro_transparency = "semitransparent" ]
663
- pub macro cfg ( ) { /* compiler built-in */ }
672
+ pub macro cfg ( ) {
673
+ /* compiler built-in */
674
+ }
664
675
665
676
#[ rustc_builtin_macro]
666
677
#[ rustc_macro_transparency = "semitransparent" ]
667
- pub macro global_asm ( ) { /* compiler built-in */ }
678
+ pub macro global_asm ( ) {
679
+ /* compiler built-in */
680
+ }
668
681
669
682
pub static A_STATIC : u8 = 42 ;
670
683
0 commit comments