From 0aed810abf6f37d478965024fdbeffee2759794c Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sun, 17 Nov 2019 16:09:14 +0300 Subject: [PATCH] rustc_metadata: Minor cleanup --- src/librustc_metadata/creader.rs | 2 +- src/librustc_metadata/cstore.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc_metadata/creader.rs b/src/librustc_metadata/creader.rs index 6d5bd5d3a09..5424ef429ad 100644 --- a/src/librustc_metadata/creader.rs +++ b/src/librustc_metadata/creader.rs @@ -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); } }); diff --git a/src/librustc_metadata/cstore.rs b/src/librustc_metadata/cstore.rs index d19f05619d9..e2d3da6237a 100644 --- a/src/librustc_metadata/cstore.rs +++ b/src/librustc_metadata/cstore.rs @@ -90,8 +90,8 @@ #[derive(Clone)] pub struct CStore { metas: IndexVec>>, - pub(crate) injected_panic_runtime: Option, - pub(crate) allocator_kind: Option, + crate injected_panic_runtime: Option, + crate allocator_kind: Option, } pub enum LoadedMacro {