about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-04-06 14:22:13 -0700
committerAlex Crichton <alex@alexcrichton.com>2018-04-13 07:04:24 -0700
commit46d16b66e0b017430eb50b247926ea447c60ef07 (patch)
treed477d01e863fd24a68c7158bb4a6a931ec0f1330 /src/liballoc
parent2bb5b5c07c5cd015c567ce86eae07e92db07bb8a (diff)
downloadrust-46d16b66e0b017430eb50b247926ea447c60ef07.tar.gz
rust-46d16b66e0b017430eb50b247926ea447c60ef07.zip
std: Avoid allocating panic message unless needed
This commit removes allocation of the panic message in instances like
`panic!("foo: {}", "bar")` if we don't actually end up needing the message. We
don't need it in the case of wasm32 right now, and in general it's not needed
for panic=abort instances that use the default panic hook.

For now this commit only solves the wasm use case where with LTO the allocation
is entirely removed, but the panic=abort use case can be implemented at a later
date if needed.
Diffstat (limited to 'src/liballoc')
0 files changed, 0 insertions, 0 deletions