info!(" cnum: {}", cnum);
info!(" hash: {}", data.root.hash);
info!(" reqd: {:?}", *data.dep_kind.lock());
- let CrateSource { dylib, rlib, rmeta } = data.source.clone();
- dylib.map(|dl| info!(" dylib: {}", dl.0.display()));
- rlib.map(|rl| info!(" rlib: {}", rl.0.display()));
- rmeta.map(|rl| info!(" rmeta: {}", rl.0.display()));
+ let CrateSource { dylib, rlib, rmeta } = data.source();
+ dylib.as_ref().map(|dl| info!(" dylib: {}", dl.0.display()));
+ rlib.as_ref().map(|rl| info!(" rlib: {}", rl.0.display()));
+ rmeta.as_ref().map(|rl| info!(" rmeta: {}", rl.0.display()));
});
}
// We're also sure to compare *paths*, not actual byte slices. The
// `source` stores paths which are normalized which may be different
// from the strings on the command line.
- let source = &self.cstore.get_crate_data(cnum).source;
+ let source = self.cstore.get_crate_data(cnum).source();
if let Some(entry) = self.sess.opts.externs.get(&name.as_str()) {
// Only use `--extern crate_name=path` here, not `--extern crate_name`.
let found = entry.locations.iter().filter_map(|l| l.as_ref()).any(|l| {