pub fn encode_metadata(tcx: TyCtxt<'_>) -> EncodedMetadata