]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_metadata/cstore_impl.rs
rustc: Migrate `CStore::native_libraries` to a query
[rust.git] / src / librustc_metadata / cstore_impl.rs
index 22a1205bbfc38c3c4e534cd41f2e82a7c39c6b30..537154b4a4cac30354aa590767f3235d3d3577f1 100644 (file)
@@ -164,6 +164,7 @@ fn into_def_id(self) -> DefId { self.as_def_id() }
     is_no_builtins => { cdata.is_no_builtins(&tcx.dep_graph) }
     impl_defaultness => { cdata.get_impl_defaultness(def_id.index) }
     exported_symbols => { Rc::new(cdata.get_exported_symbols(&tcx.dep_graph)) }
+    native_libraries => { Rc::new(cdata.get_native_libraries(&tcx.dep_graph)) }
 }
 
 pub fn provide_local<'tcx>(providers: &mut Providers<'tcx>) {
@@ -298,11 +299,6 @@ fn derive_registrar_fn(&self, cnum: CrateNum) -> Option<DefId>
         })
     }
 
-    fn native_libraries(&self, cnum: CrateNum) -> Vec<NativeLibrary>
-    {
-        self.get_crate_data(cnum).get_native_libraries(&self.dep_graph)
-    }
-
     /// Returns the `DefKey` for a given `DefId`. This indicates the
     /// parent `DefId` as well as some idea of what kind of data the
     /// `DefId` refers to.