@@ -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 ( ) ;
@@ -395,7 +395,7 @@ impl<'a> CrateReader<'a> {
395
395
if explicitly_linked && !data. explicitly_linked . get ( ) {
396
396
data. explicitly_linked . set ( explicitly_linked) ;
397
397
}
398
- ( cnum, data, self . cstore . do_get_used_crate_source ( cnum) . unwrap ( ) )
398
+ ( cnum, data, self . cstore . used_crate_source ( cnum) )
399
399
}
400
400
LookupResult :: Loaded ( library) => {
401
401
self . register_crate ( root, ident, name, span, library,
@@ -707,7 +707,8 @@ impl<'a> CrateReader<'a> {
707
707
}
708
708
709
709
impl < ' a , ' b > LocalCrateReader < ' a , ' b > {
710
- pub fn new ( sess : & ' a Session , cstore : & ' a CStore , map : & ' a hir_map:: Map < ' b > ) -> LocalCrateReader < ' a , ' b > {
710
+ pub fn new ( sess : & ' a Session , cstore : & ' a CStore ,
711
+ map : & ' a hir_map:: Map < ' b > ) -> LocalCrateReader < ' a , ' b > {
711
712
LocalCrateReader {
712
713
sess : sess,
713
714
cstore : cstore,
0 commit comments