- Notifications
You must be signed in to change notification settings - Fork 14.1k
Closed
Labels
A-type-systemArea: Type systemArea: Type systemC-bugCategory: This is a bug.Category: This is a bug.P-lowLow priorityLow priority
Description
unsafe { let my_num: &[i32; 2] = &[10, 20]; let my_num: *const i32 = my_num as *const i32; // This works. println!("{}", *my_num.offset(1)); }unsafe { let my_num: &mut [i32; 2] = &mut [10, 20]; // error: mismatched types: // expected `*mut i32`, // found `&mut [i32; 2]` let my_num: *mut i32 = my_num as *mut i32; println!("{}", *my_num.offset(1)); }Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type systemC-bugCategory: This is a bug.Category: This is a bug.P-lowLow priorityLow priority