The in situ formation of an electrolyte via the lithiation of Mg(BH4)2 in an all-solid-state lithium battery.