-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
The following code causes rustc to ICE:
use std::ptr;
use std::raw;
fn main() {
unsafe {
let nil: *const u8 = ptr::null();
let slice: raw::Slice<u8> =
Slice {
data: nil,
len: 0,
};
}
}
whereas this will compile just fine:
use std::ptr;
use std::raw;
fn main() {
unsafe {
let nil: *const u8 = ptr::null();
let slice: raw::Slice<u8> =
raw::Slice {
data: nil,
len: 0,
};
}
}
Metadata
Metadata
Assignees
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️