@@ -20,7 +20,7 @@ use loader::{self, CratePaths};
20
20
use rustc:: back:: svh:: Svh ;
21
21
use rustc:: session:: { config, Session } ;
22
22
use rustc:: session:: search_paths:: PathKind ;
23
- use rustc:: middle:: cstore:: validate_crate_name;
23
+ use rustc:: middle:: cstore:: { CrateStore , validate_crate_name} ;
24
24
use rustc:: util:: nodemap:: FnvHashMap ;
25
25
use rustc:: front:: map as hir_map;
26
26
@@ -223,7 +223,7 @@ impl<'a> CrateReader<'a> {
223
223
// We're also sure to compare *paths*, not actual byte slices. The
224
224
// `source` stores paths which are normalized which may be different
225
225
// from the strings on the command line.
226
- let source = self . cstore . do_get_used_crate_source ( cnum) . unwrap ( ) ;
226
+ let source = self . cstore . used_crate_source ( cnum) ;
227
227
if let Some ( locs) = self . sess . opts . externs . get ( name) {
228
228
let found = locs. iter ( ) . any ( |l| {
229
229
let l = fs:: canonicalize ( l) . ok ( ) ;
@@ -396,7 +396,7 @@ impl<'a> CrateReader<'a> {
396
396
if explicitly_linked && !data. explicitly_linked . get ( ) {
397
397
data. explicitly_linked . set ( explicitly_linked) ;
398
398
}
399
- ( cnum, data, self . cstore . do_get_used_crate_source ( cnum) . unwrap ( ) )
399
+ ( cnum, data, self . cstore . used_crate_source ( cnum) )
400
400
}
401
401
LookupResult :: Loaded ( library) => {
402
402
self . register_crate ( root, ident, name, span, library,
@@ -708,7 +708,8 @@ impl<'a> CrateReader<'a> {
708
708
}
709
709
710
710
impl < ' a , ' b > LocalCrateReader < ' a , ' b > {
711
- pub fn new ( sess : & ' a Session , cstore : & ' a CStore , map : & ' a hir_map:: Map < ' b > ) -> LocalCrateReader < ' a , ' b > {
711
+ pub fn new ( sess : & ' a Session , cstore : & ' a CStore ,
712
+ map : & ' a hir_map:: Map < ' b > ) -> LocalCrateReader < ' a , ' b > {
712
713
LocalCrateReader {
713
714
sess : sess,
714
715
cstore : cstore,
0 commit comments