Skip to content

Commit da81b88

Browse files
committed
Auto merge of #49332 - alexcrichton:beta-next, r=alexcrichton
[beta] A few final backports Backport of * #48782 * #49273
2 parents 1104e76 + a1d7c15 commit da81b88

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

src/librustc_metadata/decoder.rs

+19-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
use cstore::{self, CrateMetadata, MetadataBlob, NativeLibrary};
1414
use schema::*;
1515

16-
use rustc::hir::map::{DefKey, DefPath, DefPathData, DefPathHash};
16+
use rustc::hir::map::{DefKey, DefPath, DefPathData, DefPathHash,
17+
DisambiguatedDefPathData};
1718
use rustc::hir;
1819
use rustc::middle::cstore::{LinkagePreference, ExternConstBody,
1920
ExternBodyNestedBodies};
@@ -1061,7 +1062,23 @@ impl<'a, 'tcx> CrateMetadata {
10611062

10621063
#[inline]
10631064
pub fn def_key(&self, index: DefIndex) -> DefKey {
1064-
self.def_path_table.def_key(index)
1065+
if !self.is_proc_macro(index) {
1066+
self.def_path_table.def_key(index)
1067+
} else {
1068+
// FIXME(#49271) - It would be better if the DefIds were consistent
1069+
// with the DefPathTable, but for proc-macro crates
1070+
// they aren't.
1071+
let name = self.proc_macros
1072+
.as_ref()
1073+
.unwrap()[index.to_proc_macro_index()].0;
1074+
DefKey {
1075+
parent: Some(CRATE_DEF_INDEX),
1076+
disambiguated_data: DisambiguatedDefPathData {
1077+
data: DefPathData::MacroDef(name.as_str()),
1078+
disambiguator: 0,
1079+
}
1080+
}
1081+
}
10651082
}
10661083

10671084
// Returns the path leading to the thing with this `id`.

src/llvm

Submodule llvm updated 95 files

src/rustllvm/llvm-rebuild-trigger

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# If this file is modified, then llvm will be (optionally) cleaned and then rebuilt.
22
# The actual contents of this file do not matter, but to trigger a change on the
33
# build bots then the contents should be changed so git updates the mtime.
4-
2018-02-09
4+
2018-03-06

0 commit comments

Comments
 (0)