File tree 1 file changed +2
-11
lines changed
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] {
1470
1470
// remaining % 4 bytes.
1471
1471
wr. write( & [ 0u8 , 0u8 , 0u8 , 0u8 ] ) ;
1472
1472
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
-
1481
1473
let writer_bytes: & mut ~[ u8] = wr. bytes;
1482
1474
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)
1486
1477
}
1487
1478
1488
1479
// Get the encoded string for a type
You can’t perform that action at this time.
0 commit comments