]> git.lizzy.rs Git - rust.git/commitdiff
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)
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


Trivial merge