Skip to content

Commit 59c6fad

Browse files
committed
Auto merge of #14315 - ehuss:windows-warnings, r=weihanglo
Fix warnings building tests on Windows This fixes a few warnings when building cargo's testsuite on Windows due to some imports only being used inside some `cfg` elided tests.
2 parents b5d44db + 9ccd7c4 commit 59c6fad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/testsuite/open_namespaces.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use cargo_test_support::prelude::*;
22
use cargo_test_support::project;
3-
use cargo_test_support::registry::RegistryBuilder;
43
use cargo_test_support::str;
54

65
#[cargo_test]
@@ -331,6 +330,7 @@ fn main() {}
331330
#[cargo_test]
332331
#[cfg(unix)] // until we get proper packaging support
333332
fn publish_namespaced() {
333+
use cargo_test_support::registry::RegistryBuilder;
334334
let registry = RegistryBuilder::new().http_api().http_index().build();
335335

336336
let p = project()

tests/testsuite/profile_trim_paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Tests for `-Ztrim-paths`.
22
33
use cargo_test_support::basic_manifest;
4-
use cargo_test_support::compare::assert_e2e;
54
use cargo_test_support::git;
65
use cargo_test_support::paths;
76
use cargo_test_support::prelude::*;
@@ -681,6 +680,7 @@ fn custom_build_env_var_trim_paths() {
681680
#[cfg(unix)]
682681
#[cargo_test(requires_lldb, nightly, reason = "-Zremap-path-scope is unstable")]
683682
fn lldb_works_after_trimmed() {
683+
use cargo_test_support::compare::assert_e2e;
684684
use cargo_util::is_ci;
685685

686686
if !is_ci() {

0 commit comments

Comments
 (0)