]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #37931 - eddyb:meta-version, r=jseyfried
authorbors <bors@rust-lang.org>
Wed, 23 Nov 2016 23:48:44 +0000 (17:48 -0600)
committerGitHub <noreply@github.com>
Wed, 23 Nov 2016 23:48:44 +0000 (17:48 -0600)
rustc_metadata: don't break the version check when CrateRoot changes.

In #36551 I made `rustc_version` a field of `CrateRoot`, but despite it being the first field, one could still break the version check by changing `CrateRoot` so older compilers couldn't fully decode it (e.g. #37463).

This PR fixes #37803 by moving the version string back at the beginning of metadata, right after the 32-bit big-endian absolute position of `CrateRoot`, and by incrementing `METADATA_VERSION`.

1  2 
src/librustc_metadata/decoder.rs
src/librustc_metadata/locator.rs

Simple merge
Simple merge