Upstream changes in core::fmt.