Move error formatting to fmt.rs

Created by  David Tolnay  on November 15, 2019
YNTEYSW7NVBWQLJU45XRK7AWQR5NWFOB4UUVVQ62ERZOO2QJJGAAC
Change contents