Skip to content

Fix two bugs for [expr; n] expressions #23365

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 15, 2015
Merged

Conversation

dotdash
Copy link
Contributor

@dotdash dotdash commented Mar 14, 2015

[expr; 0] currently exhibits inconsistent behaviour and [expr; n] with n > 1 triggers an LLVM assertion in case that "expr" diverges.

dotdash added 2 commits March 14, 2015 14:19
In case that there is a destination for the array, like in
"let x = [expr; n]", we currently don't evaluate the given expression if
n is zero. That's inconsistent with all other cases, including "[expr;
0]" without a destination.

Fixes rust-lang#23354
@rust-highfive
Copy link
Contributor

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

@eddyb
Copy link
Member

eddyb commented Mar 14, 2015

@bors rollup r+

@bors
Copy link
Collaborator

bors commented Mar 14, 2015

@bors r=eddyb 9eed8ea

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 15, 2015
 [expr; 0] currently exhibits inconsistent behaviour and [expr; n] with n > 1 triggers an LLVM assertion in case that \"expr\" diverges.
@bors bors merged commit 9eed8ea into rust-lang:master Mar 15, 2015
@dotdash dotdash deleted the array_loop_panic branch May 8, 2015 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants