diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-01-21 10:08:10 -0800 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-02-02 01:44:48 +1100 |
| commit | a4dd3fe2f2266c10ed0e3bc07a165c2f094e1c1b (patch) | |
| tree | c40e3c42b3798279c5dc1a38cba62f4a980e70a0 /src/librustpkg | |
| parent | 3c9e9d35ac0f6469e0eeffc5c497f4b3ed6f1f8a (diff) | |
librustc: Fix merge fallout.
Diffstat (limited to 'src/librustpkg')
| -rw-r--r-- | src/librustpkg/util.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/librustpkg/util.rs b/src/librustpkg/util.rs index d806194ffbc..ba31699a7d0 100644 --- a/src/librustpkg/util.rs +++ b/src/librustpkg/util.rs @@ -472,13 +472,14 @@ impl<'a> CrateInstaller<'a> { match vi.node { // ignore metadata, I guess - ast::ViewItemExternMod(lib_ident, path_opt, _) => { - let lib_name = match path_opt { - Some((p, _)) => p, - None => self.sess.str_of(lib_ident) + ast::ViewItemExternMod(ref lib_ident, ref path_opt, _) => { + let lib_name = match *path_opt { + Some((ref p, _)) => (*p).clone(), + None => token::get_ident(lib_ident.name), }; debug!("Finding and installing... {}", lib_name); - let crate_id: CrateId = from_str(lib_name).expect("valid crate id"); + let crate_id: CrateId = + from_str(lib_name.get()).expect("valid crate id"); // Check standard Rust library path first let whatever = system_library(&self.context.sysroot_to_use(), &crate_id); debug!("system library returned {:?}", whatever); |
