rustc_metadata: Minor cleanup

This commit is contained in:
Vadim Petrochenkov 2019-11-17 16:09:14 +03:00
parent ff3e06fbe6
commit 0aed810abf
2 changed files with 3 additions and 3 deletions

View File

@ -141,7 +141,7 @@ fn existing_match(&self, name: Symbol, hash: Option<&Svh>, kind: PathKind)
let prev_kind = source.dylib.as_ref().or(source.rlib.as_ref())
.or(source.rmeta.as_ref())
.expect("No sources for crate").1;
if ret.is_none() && (prev_kind == kind || prev_kind == PathKind::All) {
if kind.matches(prev_kind) {
ret = Some(cnum);
}
});

View File

@ -90,8 +90,8 @@
#[derive(Clone)]
pub struct CStore {
metas: IndexVec<CrateNum, Option<Lrc<CrateMetadata>>>,
pub(crate) injected_panic_runtime: Option<CrateNum>,
pub(crate) allocator_kind: Option<AllocatorKind>,
crate injected_panic_runtime: Option<CrateNum>,
crate allocator_kind: Option<AllocatorKind>,
}
pub enum LoadedMacro {