]> git.lizzy.rs Git - rust.git/commit
Auto merge of #29984 - Manishearth:slice-assert, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 23 Nov 2015 06:27:49 +0000 (06:27 +0000)
committerbors <bors@rust-lang.org>
Mon, 23 Nov 2015 06:27:49 +0000 (06:27 +0000)
commit4891c00634f209bcc66d7f00bc507eb35a0fe6a8
treed6ff03ef233fcb1015438ce74358b2a5a0500d90
parent2ba44607fe09c4fb98a52ca2149b0c9869a87b4c
parent5c873be9c323f15f102720fe9085e2c4e982bb6d
Auto merge of #29984 - Manishearth:slice-assert, r=alexcrichton

I'd like to have the message print out the index and length values like it does elsewhere, but I'm not sure how to do that without affecting perf here. Will `assert!(cond, "index out of bounds got {} but len is ", idx, len)` make things slower? It calls `panic_fmt` which is marked as cold but also calls `format_args!`, and I don't know if that allocates or does any heavy lifting.

cc @alexcrichton @Gankro