@@ -12,7 +12,7 @@ extern crate mini_core;
12
12
use mini_core:: * ;
13
13
use mini_core:: libc:: * ;
14
14
15
- unsafe extern "C" fn my_puts ( s : * const u8 ) {
15
+ unsafe extern "C" fn my_puts ( s : * const i8 ) {
16
16
puts ( s) ;
17
17
}
18
18
@@ -37,7 +37,7 @@ trait SomeTrait {
37
37
impl SomeTrait for & ' static str {
38
38
fn object_safe ( & self ) {
39
39
unsafe {
40
- puts ( * self as * const str as * const u8 ) ;
40
+ puts ( * self as * const str as * const i8 ) ;
41
41
}
42
42
}
43
43
}
@@ -52,15 +52,15 @@ struct NoisyDropInner;
52
52
impl Drop for NoisyDrop {
53
53
fn drop ( & mut self ) {
54
54
unsafe {
55
- puts ( self . text as * const str as * const u8 ) ;
55
+ puts ( self . text as * const str as * const i8 ) ;
56
56
}
57
57
}
58
58
}
59
59
60
60
impl Drop for NoisyDropInner {
61
61
fn drop ( & mut self ) {
62
62
unsafe {
63
- puts ( "Inner got dropped!\0 " as * const str as * const u8 ) ;
63
+ puts ( "Inner got dropped!\0 " as * const str as * const i8 ) ;
64
64
}
65
65
}
66
66
}
@@ -82,9 +82,9 @@ fn start<T: Termination + 'static>(
82
82
argv : * const * const u8 ,
83
83
) -> isize {
84
84
if argc == 3 {
85
- unsafe { puts ( * argv) ; }
86
- unsafe { puts ( * ( ( argv as usize + intrinsics:: size_of :: < * const u8 > ( ) ) as * const * const u8 ) ) ; }
87
- unsafe { puts ( * ( ( argv as usize + 2 * intrinsics:: size_of :: < * const u8 > ( ) ) as * const * const u8 ) ) ; }
85
+ unsafe { puts ( * argv as * const i8 ) ; }
86
+ unsafe { puts ( * ( ( argv as usize + intrinsics:: size_of :: < * const u8 > ( ) ) as * const * const i8 ) ) ; }
87
+ unsafe { puts ( * ( ( argv as usize + 2 * intrinsics:: size_of :: < * const u8 > ( ) ) as * const * const i8 ) ) ; }
88
88
}
89
89
90
90
main ( ) . report ( ) ;
@@ -154,11 +154,11 @@ fn main() {
154
154
printf ( "Hello %s\n \0 " as * const str as * const i8 , "printf\0 " as * const str as * const i8 ) ;
155
155
156
156
let hello: & [ u8 ] = b"Hello\0 " as & [ u8 ; 6 ] ;
157
- let ptr: * const u8 = hello as * const [ u8 ] as * const u8 ;
157
+ let ptr: * const i8 = hello as * const [ u8 ] as * const i8 ;
158
158
puts ( ptr) ;
159
159
160
160
let world: Box < & str > = box "World!\0 " ;
161
- puts ( * world as * const str as * const u8 ) ;
161
+ puts ( * world as * const str as * const i8 ) ;
162
162
world as Box < dyn SomeTrait > ;
163
163
164
164
assert_eq ! ( intrinsics:: bitreverse( 0b10101000u8 ) , 0b00010101u8 ) ;
@@ -242,13 +242,13 @@ fn main() {
242
242
assert_eq ! ( ( ( |( ) | 42u8 ) as fn ( ( ) ) -> u8 ) ( ( ) ) , 42 ) ;
243
243
244
244
extern {
245
- #[ linkage = "weak " ]
245
+ #[ linkage = "extern_weak " ]
246
246
static ABC : * const u8 ;
247
247
}
248
248
249
249
{
250
250
extern {
251
- #[ linkage = "weak " ]
251
+ #[ linkage = "extern_weak " ]
252
252
static ABC : * const u8 ;
253
253
}
254
254
}
@@ -351,7 +351,7 @@ fn test_tls() {
351
351
// TLS of main thread must not have been changed by the other thread.
352
352
assert_eq ! ( TLS , 42 ) ;
353
353
354
- puts ( "TLS works!\n \0 " as * const str as * const u8 ) ;
354
+ puts ( "TLS works!\n \0 " as * const str as * const i8 ) ;
355
355
}
356
356
}
357
357
0 commit comments