diff options
| author | bors <bors@rust-lang.org> | 2020-02-16 01:46:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-16 01:46:05 +0000 |
| commit | 2a0d1cbd4674a6b2a58832513ecb2e97538f2c4a (patch) | |
| tree | ecd466a7b83d89a9973d9147f43f554494f86a93 /src/librustc_metadata/rmeta/decoder.rs | |
| parent | 8ba3ca0e6bef416ecba3c8ded1f67a953d28600f (diff) | |
| parent | 516459870cf0fe13979aaa568bfc413e2e5bba18 (diff) | |
Auto merge of #68814 - Aaron1011:fix/proc-macro-order-two, r=petrochenkov
Record proc macro harness order for use during metadata deserialization Fixes #68690 When we generate the proc macro harness, we now explicitly recorder the order in which we generate entries. We then use this ordering data to deserialize the correct proc-macro-data from the crate metadata.
Diffstat (limited to 'src/librustc_metadata/rmeta/decoder.rs')
| -rw-r--r-- | src/librustc_metadata/rmeta/decoder.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/librustc_metadata/rmeta/decoder.rs b/src/librustc_metadata/rmeta/decoder.rs index 58cf142ab3a..01fd637b20e 100644 --- a/src/librustc_metadata/rmeta/decoder.rs +++ b/src/librustc_metadata/rmeta/decoder.rs @@ -637,10 +637,6 @@ impl<'a, 'tcx> CrateMetadata { fn raw_proc_macro(&self, id: DefIndex) -> &ProcMacro { // DefIndex's in root.proc_macro_data have a one-to-one correspondence // with items in 'raw_proc_macros'. - // NOTE: If you update the order of macros in 'proc_macro_data' for any reason, - // you must also update src/librustc_builtin_macros/proc_macro_harness.rs - // Failing to do so will result in incorrect data being associated - // with proc macros when deserialized. let pos = self.root.proc_macro_data.unwrap().decode(self).position(|i| i == id).unwrap(); &self.raw_proc_macros.unwrap()[pos] } |
