Skip to content

Commit ee1b419

Browse files
committed
revert no-longer-required workaround for mystery bug, close #3396
1 parent 53196bb commit ee1b419

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/librustc/metadata/encoder.rs

+2-11
Original file line numberDiff line numberDiff line change
@@ -1455,19 +1455,10 @@ pub fn encode_metadata(parms: EncodeParams, crate: &crate) -> ~[u8] {
14551455
// remaining % 4 bytes.
14561456
wr.write(&[0u8, 0u8, 0u8, 0u8]);
14571457

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-
14661458
let writer_bytes: &mut ~[u8] = wr.bytes;
14671459

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)
14711462
}
14721463

14731464
// Get the encoded string for a type

0 commit comments

Comments
 (0)