-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-DSTsArea: Dynamically-sized types (DSTs)Area: Dynamically-sized types (DSTs)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
This code should trigger a compilation error because [u8]
isn't sized:
fn test(t: &([u8], [u16])) -> &[u16] {
&t.1
}
Instead it triggers an LLVM assertion error:
rustc: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/IR/Instructions.cpp:1304: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
(playpen)
Metadata
Metadata
Assignees
Labels
A-DSTsArea: Dynamically-sized types (DSTs)Area: Dynamically-sized types (DSTs)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️