File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -1470,19 +1470,10 @@ pub fn encode_metadata(parms: EncodeParams, crate: &crate) -> ~[u8] {
14701470 // remaining % 4 bytes.
14711471 wr. write( & [ 0u8 , 0u8 , 0u8 , 0u8 ] ) ;
14721472
1473- // FIXME #3396: weird bug here, for reasons unclear this emits random
1474- // looking bytes (mostly 0x1) if we use the version byte-array constant
1475- // above; so we use a string constant inline instead.
1476- //
1477- // Should be:
1478- //
1479- // vec::to_owned(metadata_encoding_version) +
1480-
14811473 let writer_bytes: & mut ~[ u8] = wr. bytes;
14821474
1483- ( do str:: as_bytes( & ~"rust\x00 \x00 \x00 \x01 ") |bytes| {
1484- vec:: slice( * bytes, 0 , 8 ) . to_vec( )
1485- } ) + flate:: deflate_bytes( * writer_bytes)
1475+ vec:: to_owned( metadata_encoding_version) +
1476+ flate:: deflate_bytes( * writer_bytes)
14861477}
14871478
14881479// Get the encoded string for a type
You can’t perform that action at this time.
0 commit comments