about summary refs log tree commit diff
path: root/src/librustc_interface
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-05-18 00:18:50 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-05-20 21:53:19 +0300
commitee7a35ab95e00b5015bff8af5959ce28af528ca5 (patch)
tree68bd90449ea9243997c03e217d748dc31449eb2a /src/librustc_interface
parentf182c4af8a22df906f6e901cb11a1a804f29f32c (diff)
downloadrust-ee7a35ab95e00b5015bff8af5959ce28af528ca5.tar.gz
rust-ee7a35ab95e00b5015bff8af5959ce28af528ca5.zip
Rename some types describing native libraries
NativeLibrary(Kind) -> NativeLib(Kind)
NativeStatic -> StaticBundle
NativeStaticNobundle -> StaticNoBundle
NativeFramework -> Framework
NativeRawDylib -> RawDylib
NativeUnknown -> Unspecified
Diffstat (limited to 'src/librustc_interface')
-rw-r--r--src/librustc_interface/tests.rs44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/librustc_interface/tests.rs b/src/librustc_interface/tests.rs
index 5e17660f4c6..3b89ceff447 100644
--- a/src/librustc_interface/tests.rs
+++ b/src/librustc_interface/tests.rs
@@ -2,7 +2,6 @@ use crate::interface::parse_cfgspecs;
 
 use rustc_data_structures::fx::FxHashSet;
 use rustc_errors::{emitter::HumanReadableErrorType, registry, ColorConfig};
-use rustc_middle::middle::cstore;
 use rustc_session::config::Strip;
 use rustc_session::config::{build_configuration, build_session_options, to_crate_config};
 use rustc_session::config::{rustc_optgroups, ErrorOutputType, ExternLocation, Options, Passes};
@@ -11,6 +10,7 @@ use rustc_session::config::{Externs, OutputType, OutputTypes, Sanitizer, SymbolM
 use rustc_session::getopts;
 use rustc_session::lint::Level;
 use rustc_session::search_paths::SearchPath;
+use rustc_session::utils::NativeLibKind;
 use rustc_session::{build_session, Session};
 use rustc_span::edition::{Edition, DEFAULT_EDITION};
 use rustc_span::symbol::sym;
@@ -300,30 +300,30 @@ fn test_native_libs_tracking_hash_different_values() {
 
     // Reference
     v1.libs = vec![
-        (String::from("a"), None, Some(cstore::NativeStatic)),
-        (String::from("b"), None, Some(cstore::NativeFramework)),
-        (String::from("c"), None, Some(cstore::NativeUnknown)),
+        (String::from("a"), None, Some(NativeLibKind::StaticBundle)),
+        (String::from("b"), None, Some(NativeLibKind::Framework)),
+        (String::from("c"), None, Some(NativeLibKind::Unspecified)),
     ];
 
     // Change label
     v2.libs = vec![
-        (String::from("a"), None, Some(cstore::NativeStatic)),
-        (String::from("X"), None, Some(cstore::NativeFramework)),
-        (String::from("c"), None, Some(cstore::NativeUnknown)),
+        (String::from("a"), None, Some(NativeLibKind::StaticBundle)),
+        (String::from("X"), None, Some(NativeLibKind::Framework)),
+        (String::from("c"), None, Some(NativeLibKind::Unspecified)),
     ];
 
     // Change kind
     v3.libs = vec![
-        (String::from("a"), None, Some(cstore::NativeStatic)),
-        (String::from("b"), None, Some(cstore::NativeStatic)),
-        (String::from("c"), None, Some(cstore::NativeUnknown)),
+        (String::from("a"), None, Some(NativeLibKind::StaticBundle)),
+        (String::from("b"), None, Some(NativeLibKind::StaticBundle)),
+        (String::from("c"), None, Some(NativeLibKind::Unspecified)),
     ];
 
     // Change new-name
     v4.libs = vec![
-        (String::from("a"), None, Some(cstore::NativeStatic)),
-        (String::from("b"), Some(String::from("X")), Some(cstore::NativeFramework)),
-        (String::from("c"), None, Some(cstore::NativeUnknown)),
+        (String::from("a"), None, Some(NativeLibKind::StaticBundle)),
+        (String::from("b"), Some(String::from("X")), Some(NativeLibKind::Framework)),
+        (String::from("c"), None, Some(NativeLibKind::Unspecified)),
     ];
 
     assert!(v1.dep_tracking_hash() != v2.dep_tracking_hash());
@@ -345,21 +345,21 @@ fn test_native_libs_tracking_hash_different_order() {
 
     // Reference
     v1.libs = vec![
-        (String::from("a"), None, Some(cstore::NativeStatic)),
-        (String::from("b"), None, Some(cstore::NativeFramework)),
-        (String::from("c"), None, Some(cstore::NativeUnknown)),
+        (String::from("a"), None, Some(NativeLibKind::StaticBundle)),
+        (String::from("b"), None, Some(NativeLibKind::Framework)),
+        (String::from("c"), None, Some(NativeLibKind::Unspecified)),
     ];
 
     v2.libs = vec![
-        (String::from("b"), None, Some(cstore::NativeFramework)),
-        (String::from("a"), None, Some(cstore::NativeStatic)),
-        (String::from("c"), None, Some(cstore::NativeUnknown)),
+        (String::from("b"), None, Some(NativeLibKind::Framework)),
+        (String::from("a"), None, Some(NativeLibKind::StaticBundle)),
+        (String::from("c"), None, Some(NativeLibKind::Unspecified)),
     ];
 
     v3.libs = vec![
-        (String::from("c"), None, Some(cstore::NativeUnknown)),
-        (String::from("a"), None, Some(cstore::NativeStatic)),
-        (String::from("b"), None, Some(cstore::NativeFramework)),
+        (String::from("c"), None, Some(NativeLibKind::Unspecified)),
+        (String::from("a"), None, Some(NativeLibKind::StaticBundle)),
+        (String::from("b"), None, Some(NativeLibKind::Framework)),
     ];
 
     assert!(v1.dep_tracking_hash() == v2.dep_tracking_hash());