Add a specialization for encoding byte arrays in rmeta
This commit is contained in:
parent
734a0d0aa0
commit
b233263309
@ -347,6 +347,13 @@ fn encode(&self, s: &mut EncodeContext<'a, 'tcx>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for [u8] {
|
||||||
|
fn encode(&self, e: &mut EncodeContext<'a, 'tcx>) {
|
||||||
|
Encoder::emit_usize(e, self.len());
|
||||||
|
e.emit_raw_bytes(self);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> TyEncoder for EncodeContext<'a, 'tcx> {
|
impl<'a, 'tcx> TyEncoder for EncodeContext<'a, 'tcx> {
|
||||||
const CLEAR_CROSS_CRATE: bool = true;
|
const CLEAR_CROSS_CRATE: bool = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user