Closed
Description
let someArray = [1,2,3];
let a = &someArray; // The variable 'a' has a type &'static [i32, 3]
let ref b = someArray; // The variable 'b' has a type &'static [i32, 3]
I've tried to write:
let ref a = someArray[..]; // I thought maybe it equals to &someArray[..];
The line above gives LLVM assertion.
I think this must show some syntax error.
Assertion failed!
Program: C:\rust\bin\rustc.exe
File: C:/bot/slave/nightly-dist-rustc-win-64/build/src/llvm/lib/IR/Instructions.
cpp, Line 1083
Expression: getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType
())->getElementType() && "Ptr must be a pointer to Val type!"
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.