diff --git a/crates/cargo-test-support/src/lib.rs b/crates/cargo-test-support/src/lib.rs index 9f6d12077..5d6e0decc 100644 --- a/crates/cargo-test-support/src/lib.rs +++ b/crates/cargo-test-support/src/lib.rs @@ -74,6 +74,7 @@ pub mod tools; pub mod prelude { pub use crate::cargo_test; + pub use crate::paths::CargoPathExt; pub use crate::ArgLine; pub use crate::CargoCommand; pub use crate::ChannelChanger; diff --git a/tests/testsuite/bench.rs b/tests/testsuite/bench.rs index 2b3554de7..e84d93d74 100644 --- a/tests/testsuite/bench.rs +++ b/tests/testsuite/bench.rs @@ -1,6 +1,5 @@ //! Tests for the `cargo bench` command. -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::{basic_bin_manifest, basic_lib_manifest, basic_manifest, project, str}; diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 49eb60db0..c0b265a84 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -12,7 +12,7 @@ use cargo::{ GlobalContext, }; use cargo_test_support::compare::assert_e2e; -use cargo_test_support::paths::{root, CargoPathExt}; +use cargo_test_support::paths::root; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::str; diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs index 6dce3d130..e5144f8f9 100644 --- a/tests/testsuite/build_script.rs +++ b/tests/testsuite/build_script.rs @@ -7,7 +7,6 @@ use std::thread; use cargo_test_support::compare::assert_e2e; use cargo_test_support::install::cargo_home; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::str; diff --git a/tests/testsuite/cache_lock.rs b/tests/testsuite/cache_lock.rs index 49468a2f9..3f3710fc7 100644 --- a/tests/testsuite/cache_lock.rs +++ b/tests/testsuite/cache_lock.rs @@ -3,7 +3,7 @@ use std::thread::JoinHandle; use cargo::util::cache_lock::{CacheLockMode, CacheLocker}; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; use cargo_test_support::prelude::*; use cargo_test_support::{retry, thread_wait_timeout, threaded_timeout}; diff --git a/tests/testsuite/cargo_command.rs b/tests/testsuite/cargo_command.rs index 4bbe4e388..6b546a6fb 100644 --- a/tests/testsuite/cargo_command.rs +++ b/tests/testsuite/cargo_command.rs @@ -8,7 +8,6 @@ use std::process::Stdio; use std::str; use cargo_test_support::basic_manifest; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::str; diff --git a/tests/testsuite/check.rs b/tests/testsuite/check.rs index b3377b1f8..d9911ee74 100644 --- a/tests/testsuite/check.rs +++ b/tests/testsuite/check.rs @@ -4,7 +4,6 @@ use std::fmt::{self, Write}; use cargo_test_support::compare::assert_e2e; use cargo_test_support::install::exe; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::str; diff --git a/tests/testsuite/clean.rs b/tests/testsuite/clean.rs index 6c7917eb5..f6cbddb01 100644 --- a/tests/testsuite/clean.rs +++ b/tests/testsuite/clean.rs @@ -1,6 +1,5 @@ //! Tests for the `cargo clean` command. -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::str; diff --git a/tests/testsuite/dep_info.rs b/tests/testsuite/dep_info.rs index 451506c83..39d55815b 100644 --- a/tests/testsuite/dep_info.rs +++ b/tests/testsuite/dep_info.rs @@ -6,7 +6,7 @@ use std::path::Path; use std::str; use cargo_test_support::compare::assert_e2e; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::str; diff --git a/tests/testsuite/doc.rs b/tests/testsuite/doc.rs index 274c33b80..713c841c5 100644 --- a/tests/testsuite/doc.rs +++ b/tests/testsuite/doc.rs @@ -4,7 +4,6 @@ use std::fs; use std::str; use cargo::core::compiler::RustDocFingerprint; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::str; diff --git a/tests/testsuite/features.rs b/tests/testsuite/features.rs index 1213c4a55..f821395e3 100644 --- a/tests/testsuite/features.rs +++ b/tests/testsuite/features.rs @@ -1,6 +1,5 @@ //! Tests for `[features]` table. -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::registry::{Dependency, Package}; use cargo_test_support::str; diff --git a/tests/testsuite/features2.rs b/tests/testsuite/features2.rs index 164a0ca27..06d56a262 100644 --- a/tests/testsuite/features2.rs +++ b/tests/testsuite/features2.rs @@ -4,7 +4,6 @@ use std::fs::File; use cargo_test_support::cross_compile::{self, alternate}; use cargo_test_support::install::cargo_home; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::publish::validate_crate_contents; use cargo_test_support::registry::{Dependency, Package}; diff --git a/tests/testsuite/fix.rs b/tests/testsuite/fix.rs index e6d0544ab..7ebab59f8 100644 --- a/tests/testsuite/fix.rs +++ b/tests/testsuite/fix.rs @@ -3,7 +3,7 @@ use cargo::core::Edition; use cargo_test_support::compare::assert_e2e; use cargo_test_support::git::{self, init}; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; use cargo_test_support::prelude::*; use cargo_test_support::registry::{Dependency, Package}; use cargo_test_support::str; diff --git a/tests/testsuite/freshness.rs b/tests/testsuite/freshness.rs index c317afd48..37c6e7b21 100644 --- a/tests/testsuite/freshness.rs +++ b/tests/testsuite/freshness.rs @@ -9,7 +9,7 @@ use std::process::Stdio; use std::thread; use std::time::SystemTime; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::{ diff --git a/tests/testsuite/git.rs b/tests/testsuite/git.rs index eee527956..bc3cbc89d 100644 --- a/tests/testsuite/git.rs +++ b/tests/testsuite/git.rs @@ -10,7 +10,7 @@ use std::sync::Arc; use std::thread; use cargo_test_support::git::cargo_uses_gitoxide; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; use cargo_test_support::prelude::IntoData; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; diff --git a/tests/testsuite/global_cache_tracker.rs b/tests/testsuite/global_cache_tracker.rs index d405affc5..9558f2aba 100644 --- a/tests/testsuite/global_cache_tracker.rs +++ b/tests/testsuite/global_cache_tracker.rs @@ -20,7 +20,7 @@ use cargo::core::global_cache_tracker::{self, DeferredGlobalLastUse, GlobalCache use cargo::util::cache_lock::CacheLockMode; use cargo::util::interning::InternedString; use cargo::GlobalContext; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; use cargo_test_support::prelude::*; use cargo_test_support::registry::{Package, RegistryBuilder}; use cargo_test_support::{ diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index 09ce2ec47..9551261db 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -21,7 +21,7 @@ use cargo_util::{ProcessBuilder, ProcessError}; use cargo_test_support::install::{ assert_has_installed_exe, assert_has_not_installed_exe, cargo_home, exe, }; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; fn pkg(name: &str, vers: &str) { Package::new(name, vers) diff --git a/tests/testsuite/install_upgrade.rs b/tests/testsuite/install_upgrade.rs index d3b74cd19..616538a65 100644 --- a/tests/testsuite/install_upgrade.rs +++ b/tests/testsuite/install_upgrade.rs @@ -8,7 +8,6 @@ use std::sync::atomic::{AtomicUsize, Ordering}; use cargo::core::PackageId; use cargo_test_support::install::{cargo_home, exe}; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::registry::{self, Package}; use cargo_test_support::{ diff --git a/tests/testsuite/local_registry.rs b/tests/testsuite/local_registry.rs index 42e2f18d4..7f2079b48 100644 --- a/tests/testsuite/local_registry.rs +++ b/tests/testsuite/local_registry.rs @@ -2,7 +2,7 @@ use std::fs; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; use cargo_test_support::prelude::*; use cargo_test_support::registry::{registry_path, Package}; use cargo_test_support::{basic_manifest, project, str, t}; diff --git a/tests/testsuite/login.rs b/tests/testsuite/login.rs index fed647284..9d5f3a2f8 100644 --- a/tests/testsuite/login.rs +++ b/tests/testsuite/login.rs @@ -4,7 +4,7 @@ use std::fs; use std::path::PathBuf; use cargo_test_support::cargo_process; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; use cargo_test_support::prelude::*; use cargo_test_support::registry::{self, RegistryBuilder}; use cargo_test_support::str; diff --git a/tests/testsuite/logout.rs b/tests/testsuite/logout.rs index 0ff27076b..aa2ac38fc 100644 --- a/tests/testsuite/logout.rs +++ b/tests/testsuite/logout.rs @@ -1,7 +1,7 @@ //! Tests for the `cargo logout` command. use super::login::check_token; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; use cargo_test_support::prelude::*; use cargo_test_support::registry::TestRegistry; use cargo_test_support::{cargo_process, registry, str}; diff --git a/tests/testsuite/old_cargos.rs b/tests/testsuite/old_cargos.rs index e177b2bf0..cb12876ab 100644 --- a/tests/testsuite/old_cargos.rs +++ b/tests/testsuite/old_cargos.rs @@ -15,7 +15,6 @@ use std::fs; use cargo::CargoResult; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::registry::{self, Dependency, Package}; use cargo_test_support::{cargo_exe, execs, paths, process, project, rustc_host}; diff --git a/tests/testsuite/owner.rs b/tests/testsuite/owner.rs index 7f7dd8f4b..ec473183f 100644 --- a/tests/testsuite/owner.rs +++ b/tests/testsuite/owner.rs @@ -2,7 +2,6 @@ use std::fs; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::project; use cargo_test_support::registry::{self, api_path}; diff --git a/tests/testsuite/package.rs b/tests/testsuite/package.rs index 773cdf758..93709c037 100644 --- a/tests/testsuite/package.rs +++ b/tests/testsuite/package.rs @@ -3,7 +3,6 @@ use std::fs::{self, read_to_string, File}; use std::path::Path; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::publish::validate_crate_contents; use cargo_test_support::registry::{self, Package}; diff --git a/tests/testsuite/path.rs b/tests/testsuite/path.rs index ff5156d61..17179a520 100644 --- a/tests/testsuite/path.rs +++ b/tests/testsuite/path.rs @@ -2,7 +2,7 @@ use std::fs; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::str; diff --git a/tests/testsuite/profile_config.rs b/tests/testsuite/profile_config.rs index 3adf1ab03..003220bcf 100644 --- a/tests/testsuite/profile_config.rs +++ b/tests/testsuite/profile_config.rs @@ -1,6 +1,5 @@ //! Tests for profiles defined in config files. -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::{basic_lib_manifest, paths, project, str}; diff --git a/tests/testsuite/profile_custom.rs b/tests/testsuite/profile_custom.rs index 50be88f08..0dfed1d18 100644 --- a/tests/testsuite/profile_custom.rs +++ b/tests/testsuite/profile_custom.rs @@ -1,6 +1,5 @@ //! Tests for named profiles. -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::{basic_lib_manifest, project, str}; diff --git a/tests/testsuite/registry.rs b/tests/testsuite/registry.rs index dbdd84b1e..b17f71d04 100644 --- a/tests/testsuite/registry.rs +++ b/tests/testsuite/registry.rs @@ -8,7 +8,7 @@ use std::sync::Mutex; use cargo::core::SourceId; use cargo_test_support::cargo_process; -use cargo_test_support::paths::{self, CargoPathExt}; +use cargo_test_support::paths; use cargo_test_support::prelude::*; use cargo_test_support::registry::{ self, registry_path, Dependency, Package, RegistryBuilder, Response, TestRegistry, diff --git a/tests/testsuite/required_features.rs b/tests/testsuite/required_features.rs index 2a193ed05..6e7398ec5 100644 --- a/tests/testsuite/required_features.rs +++ b/tests/testsuite/required_features.rs @@ -4,7 +4,6 @@ use cargo_test_support::install::{ assert_has_installed_exe, assert_has_not_installed_exe, cargo_home, }; use cargo_test_support::is_nightly; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::project; use cargo_test_support::str; diff --git a/tests/testsuite/run.rs b/tests/testsuite/run.rs index 931e9040c..d251edb19 100644 --- a/tests/testsuite/run.rs +++ b/tests/testsuite/run.rs @@ -1603,7 +1603,7 @@ fn print_env_verbose() { #[cargo_test] #[cfg(target_os = "macos")] fn run_link_system_path_macos() { - use cargo_test_support::paths::{self, CargoPathExt}; + use cargo_test_support::paths; use std::fs; // Check that the default system library path is honored. // First, build a shared library that will be accessed from diff --git a/tests/testsuite/rustc_info_cache.rs b/tests/testsuite/rustc_info_cache.rs index 91cb6a05a..8a3ac5c30 100644 --- a/tests/testsuite/rustc_info_cache.rs +++ b/tests/testsuite/rustc_info_cache.rs @@ -2,8 +2,8 @@ use std::env; +use cargo_test_support::basic_bin_manifest; use cargo_test_support::prelude::*; -use cargo_test_support::{basic_bin_manifest, paths::CargoPathExt}; use cargo_test_support::{basic_manifest, project}; const MISS: &str = "[..] rustc info cache miss[..]"; diff --git a/tests/testsuite/rustup.rs b/tests/testsuite/rustup.rs index 7e0670a4b..c9fda4566 100644 --- a/tests/testsuite/rustup.rs +++ b/tests/testsuite/rustup.rs @@ -6,7 +6,7 @@ use std::ffi::OsString; use std::fs; use std::path::{Path, PathBuf}; -use cargo_test_support::paths::{home, root, CargoPathExt}; +use cargo_test_support::paths::{home, root}; use cargo_test_support::prelude::*; use cargo_test_support::{cargo_process, process, project, str}; diff --git a/tests/testsuite/test.rs b/tests/testsuite/test.rs index 0ed64e9e7..1c6ceabd8 100644 --- a/tests/testsuite/test.rs +++ b/tests/testsuite/test.rs @@ -2,7 +2,6 @@ use std::fs; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::registry::Package; use cargo_test_support::{ diff --git a/tests/testsuite/weak_dep_features.rs b/tests/testsuite/weak_dep_features.rs index 715b7b6b2..00824eacf 100644 --- a/tests/testsuite/weak_dep_features.rs +++ b/tests/testsuite/weak_dep_features.rs @@ -2,7 +2,6 @@ use std::fmt::Write; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::registry::{Dependency, Package, RegistryBuilder}; use cargo_test_support::str; diff --git a/tests/testsuite/yank.rs b/tests/testsuite/yank.rs index 4d068c84a..04967a7a3 100644 --- a/tests/testsuite/yank.rs +++ b/tests/testsuite/yank.rs @@ -2,7 +2,6 @@ use std::fs; -use cargo_test_support::paths::CargoPathExt; use cargo_test_support::prelude::*; use cargo_test_support::project; use cargo_test_support::registry;