Skip to content

Commit

Permalink
Auto merge of #14315 - ehuss:windows-warnings, r=weihanglo
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Jul 28, 2024
2 parents b5d44db + 9ccd7c4 commit 59c6fad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/testsuite/open_namespaces.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use cargo_test_support::prelude::*;
use cargo_test_support::project;
use cargo_test_support::registry::RegistryBuilder;
use cargo_test_support::str;

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

let p = project()
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/profile_trim_paths.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Tests for `-Ztrim-paths`.

use cargo_test_support::basic_manifest;
use cargo_test_support::compare::assert_e2e;
use cargo_test_support::git;
use cargo_test_support::paths;
use cargo_test_support::prelude::*;
Expand Down Expand Up @@ -681,6 +680,7 @@ fn custom_build_env_var_trim_paths() {
#[cfg(unix)]
#[cargo_test(requires_lldb, nightly, reason = "-Zremap-path-scope is unstable")]
fn lldb_works_after_trimmed() {
use cargo_test_support::compare::assert_e2e;
use cargo_util::is_ci;

if !is_ci() {
Expand Down

0 comments on commit 59c6fad

Please sign in to comment.