Skip to content

Commit

Permalink
Auto merge of #14217 - eth3lbert:fix-snapbox-intodata, r=weihanglo
Browse files Browse the repository at this point in the history
fix(test): Reduce over-prescription to the caller

This is a follow-up fix that addresses the suggestion made in #14200 (comment) for the remaining files.
  • Loading branch information
bors committed Jul 9, 2024
2 parents f870f14 + 447ac75 commit 519c121
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 76 deletions.
3 changes: 1 addition & 2 deletions tests/testsuite/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use cargo_test_support::{
};
use cargo_test_support::{rustc_host, sleep_ms, slow_cpu_multiplier, symlink_supported};
use cargo_util::paths::{self, remove_dir_all};
use snapbox::data::Inline;
use std::env;
use std::fs;
use std::io;
Expand Down Expand Up @@ -4562,7 +4561,7 @@ fn rename_with_link_search_path_cross() {
);
}

fn _rename_with_link_search_path(cross: bool, expected: Inline) {
fn _rename_with_link_search_path(cross: bool, expected: impl IntoData) {
let target_arg = if cross {
format!(" --target={}", cross_compile::alternate())
} else {
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/fix_n_times.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! up, and verifying the results.

use cargo_test_support::{basic_manifest, paths, project, str, tools, Execs};
use snapbox::data::Inline;
use snapbox::IntoData;
use std::path::PathBuf;
use std::sync::{Mutex, OnceLock};

Expand Down Expand Up @@ -59,7 +59,7 @@ enum Step {
fn expect_fix_runs_rustc_n_times(
sequence: &[Step],
extra_execs: impl FnOnce(&mut Execs),
expected_stderr: Inline,
expected_stderr: impl IntoData,
expected_lib_rs: &str,
) {
let rustc = rustc_for_cargo_fix();
Expand Down
Loading

0 comments on commit 519c121

Please sign in to comment.