]> git.proxmox.com Git - cargo.git/commitdiff
remove host & target attributes
authorTom Dohrmann <erbse.13@gmx.de>
Sun, 12 Apr 2020 15:49:05 +0000 (17:49 +0200)
committerTom Dohrmann <erbse.13@gmx.de>
Sun, 12 Apr 2020 15:49:05 +0000 (17:49 +0200)
src/cargo/core/compiler/compilation.rs
src/cargo/ops/cargo_test.rs

index 58a6c39d2daab97068b62e9ccfec646644fb740c..b270aa39352c948f682d83cd9cd1590be977467d 100644 (file)
@@ -69,9 +69,6 @@ pub struct Compilation<'cfg> {
     /// Flags to pass to rustdoc when invoked from cargo test, per package.
     pub rustdocflags: HashMap<PackageId, Vec<String>>,
 
-    pub host: String,
-    pub target: String,
-
     config: &'cfg Config,
 
     /// Rustc process to be used by default
@@ -129,8 +126,6 @@ impl<'cfg> Compilation<'cfg> {
             rustc_process: rustc,
             rustc_workspace_wrapper_process,
             primary_rustc_process,
-            host: bcx.host_triple().to_string(),
-            target: bcx.target_data.short_name(&default_kind).to_string(),
             target_runner: target_runner(bcx, default_kind)?,
         })
     }
index 0d9b7baf9958563a7b564fd6d2ccc005ab5a9e00..e320c3a9fdcaa6975dfe117e5022d199ad77ff41 100644 (file)
@@ -144,7 +144,7 @@ fn run_doc_tests(
     let mut runtool: &Option<(std::path::PathBuf, Vec<String>)> = &None;
     if doctest_xcompile {
         runtool = compilation.target_runner();
-    } else if compilation.host != compilation.target {
+    } else if options.compile_opts.build_config.requested_kind.is_host() {
         return Ok((Test::Doc, errors));
     }