mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-25 06:03:16 +00:00
std: comment about OOM & allocs in begin_unwind_fmt.
Follow-up to #11841 which added this function.
This commit is contained in:
parent
4176343073
commit
2e24adf521
@ -391,6 +391,10 @@ pub fn begin_unwind_raw(msg: *u8, file: *u8, line: uint) -> ! {
|
||||
/// the actual formatting into this shared place.
|
||||
#[inline(never)] #[cold]
|
||||
pub fn begin_unwind_fmt(msg: &fmt::Arguments, file: &'static str, line: uint) -> ! {
|
||||
// We do two allocations here, unfortunately. But (a) they're
|
||||
// required with the current scheme, and (b) we don't handle
|
||||
// failure + OOM properly anyway (see comment in begin_unwind
|
||||
// below).
|
||||
begin_unwind_inner(~fmt::format(msg), file, line)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user