Import from core where possible In preparation for introducing no_std support!

Created by  David Tolnay  on November 27, 2019
UC2L4AE6COAZGVMLTIV4INSNKRT2RGCEE6IRLOBKCBJZ3IV7GCRAC
Change contents