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 @@ -1455,19 +1455,10 @@ pub fn encode_metadata(parms: EncodeParams, crate: &crate) -> ~[u8] {
1455
1455
// remaining % 4 bytes.
1456
1456
wr. write( & [ 0u8 , 0u8 , 0u8 , 0u8 ] ) ;
1457
1457
1458
- // FIXME #3396: weird bug here, for reasons unclear this emits random
1459
- // looking bytes (mostly 0x1) if we use the version byte-array constant
1460
- // above; so we use a string constant inline instead.
1461
- //
1462
- // Should be:
1463
- //
1464
- // vec::to_owned(metadata_encoding_version) +
1465
-
1466
1458
let writer_bytes: & mut ~[ u8] = wr. bytes;
1467
1459
1468
- ( do str:: as_bytes( & ~"rust\x00 \x00 \x00 \x01 ") |bytes| {
1469
- vec:: slice( * bytes, 0 , 8 ) . to_vec( )
1470
- } ) + flate:: deflate_bytes( * writer_bytes)
1460
+ vec:: to_owned( metadata_encoding_version) +
1461
+ flate:: deflate_bytes( * writer_bytes)
1471
1462
}
1472
1463
1473
1464
// Get the encoded string for a type
You can’t perform that action at this time.
0 commit comments