File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,5 +60,12 @@ fn main_0() -> i32 {
6060 let _str: Ptr < u8 > = ( immutable_empty_arr. as_pointer ( ) as Ptr < u8 > ) ;
6161 foo_const_1 ( _str)
6262 } ) ;
63+ let inited_through_init_list: Value < Box < [ u8 ] > > = Rc :: new ( RefCell :: new ( Box :: < [ u8 ] > :: from (
64+ b"papanasi cu smantana\0 " . as_slice ( ) ,
65+ ) ) ) ;
66+ ( {
67+ let _str: Ptr < u8 > = ( inited_through_init_list. as_pointer ( ) as Ptr < u8 > ) ;
68+ foo_const_1 ( _str)
69+ } ) ;
6370 return 0 ;
6471}
Original file line number Diff line number Diff line change @@ -91,5 +91,12 @@ fn main_0() -> i32 {
9191 let _str: Ptr < u8 > = ( immutable_empty_arr. as_pointer ( ) as Ptr < u8 > ) ;
9292 foo_const_1 ( _str)
9393 } ) ;
94+ let inited_through_init_list: Value < Box < [ u8 ] > > = Rc :: new ( RefCell :: new ( Box :: < [ u8 ] > :: from (
95+ b"papanasi cu smantana\0 " . as_slice ( ) ,
96+ ) ) ) ;
97+ ( {
98+ let _str: Ptr < u8 > = ( inited_through_init_list. as_pointer ( ) as Ptr < u8 > ) ;
99+ foo_const_1 ( _str)
100+ } ) ;
94101 return 0 ;
95102}
Original file line number Diff line number Diff line change @@ -49,5 +49,10 @@ unsafe fn main_0() -> i32 {
4949 let _str: * const u8 = immutable_empty_arr. as_ptr ( ) ;
5050 foo_const_1 ( _str)
5151 } ) ;
52+ let inited_through_init_list: [ u8 ; 21 ] = * b"papanasi cu smantana\0 " ;
53+ ( unsafe {
54+ let _str: * const u8 = inited_through_init_list. as_ptr ( ) ;
55+ foo_const_1 ( _str)
56+ } ) ;
5257 return 0 ;
5358}
Original file line number Diff line number Diff line change @@ -84,5 +84,10 @@ unsafe fn main_0() -> i32 {
8484 let _str: * const u8 = immutable_empty_arr. as_ptr ( ) ;
8585 foo_const_1 ( _str)
8686 } ) ;
87+ let inited_through_init_list: [ u8 ; 21 ] = * b"papanasi cu smantana\0 " ;
88+ ( unsafe {
89+ let _str: * const u8 = inited_through_init_list. as_ptr ( ) ;
90+ foo_const_1 ( _str)
91+ } ) ;
8792 return 0 ;
8893}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ int main() {
2323 foo_const (immutable_empty);
2424 foo_const (immutable_empty_arr);
2525
26- const char inited_through_init_list[] = { " papanasi cu smantana" };
26+ const char inited_through_init_list[] = {" papanasi cu smantana" };
2727 foo_const (inited_through_init_list);
2828
2929 return 0 ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ int main() {
3232 foo_const (mutable_empty_arr );
3333 foo_const (immutable_empty_arr );
3434
35- const char inited_through_init_list [] = { "papanasi cu smantana" };
35+ const char inited_through_init_list [] = {"papanasi cu smantana" };
3636 foo_const (inited_through_init_list );
3737
3838 return 0 ;
You can’t perform that action at this time.
0 commit comments