Skip to content

LLVM assertion on "let ref a = someArray[..];" #23605

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
demelev opened this issue Mar 22, 2015 · 0 comments · Fixed by #23361
Closed

LLVM assertion on "let ref a = someArray[..];" #23605

demelev opened this issue Mar 22, 2015 · 0 comments · Fixed by #23361
Labels
A-DSTs Area: Dynamically-sized types (DSTs) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@demelev
Copy link

demelev commented Mar 22, 2015

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.
@huonw huonw added A-DSTs Area: Dynamically-sized types (DSTs) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Mar 22, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-DSTs Area: Dynamically-sized types (DSTs) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants