Skip to content

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

Merged
bors merged 2 commits into
rust-lang:masterfrom
dotdash:array_loop_panic
Mar 15, 2015
Merged

bors merged 2 commits into
rust-lang:masterfrom
dotdash:array_loop_panic

Conversation

@dotdash

@dotdash dotdash commented Mar 14, 2015

Copy link
Copy Markdown
Contributor

[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
Copy Markdown
Contributor

r? @pnkfelix

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

@eddyb

eddyb commented Mar 14, 2015

Copy link
Copy Markdown
Contributor

@bors rollup r+

@bors

bors commented Mar 14, 2015

Copy link
Copy Markdown
Contributor

@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
lnicola pushed a commit to lnicola/rust that referenced this pull request Oct 12, 2026
fix: hover show impl header when impl with trait
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