diff --git a/crates/cargo-test-support/src/lib.rs b/crates/cargo-test-support/src/lib.rs index 50a4aef0126..e736f0712a2 100644 --- a/crates/cargo-test-support/src/lib.rs +++ b/crates/cargo-test-support/src/lib.rs @@ -816,7 +816,6 @@ impl Execs { /// - `expected` can end up being ambiguous, causing the assertion to succeed when it should fail /// /// - #[deprecated(note = "replaced with `Execs::with_stdout_data(expected)`")] pub fn with_stdout_contains(&mut self, expected: S) -> &mut Self { self.expect_stdout_contains.push(expected.to_string()); self @@ -834,7 +833,6 @@ impl Execs { /// - `expected` can end up being ambiguous, causing the assertion to succeed when it should fail /// /// - #[deprecated(note = "replaced with `Execs::with_stderr_data(expected)`")] pub fn with_stderr_contains(&mut self, expected: S) -> &mut Self { self.expect_stderr_contains.push(expected.to_string()); self @@ -857,7 +855,6 @@ impl Execs { /// [`Execs::with_stdout_contains`]. /// /// - #[deprecated] pub fn with_stdout_does_not_contain(&mut self, expected: S) -> &mut Self { self.expect_stdout_not_contains.push(expected.to_string()); self @@ -879,7 +876,6 @@ impl Execs { /// with [`Execs::with_stderr_line_without`]. /// /// - #[deprecated] pub fn with_stderr_does_not_contain(&mut self, expected: S) -> &mut Self { self.expect_stderr_not_contains.push(expected.to_string()); self @@ -916,7 +912,6 @@ impl Execs { /// This will check that a build line includes `-C opt-level=3` but does /// not contain `-C debuginfo` or `-C incremental`. /// - #[deprecated] pub fn with_stderr_line_without( &mut self, with: &[S], diff --git a/tests/testsuite/artifact_dep.rs b/tests/testsuite/artifact_dep.rs index ffb4512ddda..9b93ba8eb52 100644 --- a/tests/testsuite/artifact_dep.rs +++ b/tests/testsuite/artifact_dep.rs @@ -687,7 +687,6 @@ fn build_script_with_bin_artifact_and_lib_false() { ) .build(); - #[expect(deprecated)] p.cargo("build -Z bindeps") .masquerade_as_nightly_cargo(&["bindeps"]) .with_status(101) @@ -731,7 +730,6 @@ fn lib_with_bin_artifact_and_lib_false() { ) .build(); - #[expect(deprecated)] p.cargo("build -Z bindeps") .masquerade_as_nightly_cargo(&["bindeps"]) .with_status(101) @@ -1117,7 +1115,6 @@ fn build_script_deps_adopt_specified_target_unconditionally() { .file("bar/src/lib.rs", "pub fn doit() {}") .build(); - #[expect(deprecated)] p.cargo("check -v -Z bindeps") .masquerade_as_nightly_cargo(&["bindeps"]) .with_stderr_does_not_contain( @@ -1233,7 +1230,6 @@ fn non_build_script_deps_adopt_specified_target_unconditionally() { .file("bar/src/lib.rs", "pub fn doit() {}") .build(); - #[expect(deprecated)] p.cargo("check -v -Z bindeps") .masquerade_as_nightly_cargo(&["bindeps"]) .with_stderr_contains( @@ -1378,7 +1374,6 @@ fn build_script_deps_adopts_target_platform_if_target_equals_target() { .build(); let alternate_target = cross_compile::alternate(); - #[expect(deprecated)] p.cargo("check -v -Z bindeps --target") .arg(alternate_target) .masquerade_as_nightly_cargo(&["bindeps"]) diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 8031cbd9c6b..e184972035e 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -132,7 +132,6 @@ fn cargo_compile_incremental() { .run(); } -#[expect(deprecated)] #[cargo_test] fn incremental_profile() { let p = project() @@ -176,7 +175,6 @@ fn incremental_profile() { .run(); } -#[expect(deprecated)] #[cargo_test] fn incremental_config() { let p = project() @@ -5180,7 +5178,6 @@ WRAPPER CALLED: rustc --crate-name foo [..] .run(); } -#[expect(deprecated)] #[cargo_test] fn rustc_wrapper_queries() { // Check that the invocations querying rustc for information are done with the wrapper. @@ -5920,7 +5917,6 @@ fn build_filter_infer_profile() { .run(); } -#[expect(deprecated)] #[cargo_test] fn targets_selected_default() { let p = project().file("src/main.rs", "fn main() {}").build(); @@ -6874,7 +6870,6 @@ Caused by: .run(); } -#[expect(deprecated)] #[cargo_test] fn build_script_o0_default() { let p = project() @@ -6887,7 +6882,6 @@ fn build_script_o0_default() { .run(); } -#[expect(deprecated)] #[cargo_test] fn build_script_o0_default_even_with_release() { let p = project() diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs index 022d6e96fe3..897a0b493ef 100644 --- a/tests/testsuite/build_script.rs +++ b/tests/testsuite/build_script.rs @@ -3779,7 +3779,6 @@ fn custom_target_dir() { p.cargo("build -v").run(); } -#[expect(deprecated)] #[cargo_test] fn panic_abort_with_build_scripts() { let p = project() diff --git a/tests/testsuite/build_script_extra_link_arg.rs b/tests/testsuite/build_script_extra_link_arg.rs index 271d946fb81..ad3a8d13b7b 100644 --- a/tests/testsuite/build_script_extra_link_arg.rs +++ b/tests/testsuite/build_script_extra_link_arg.rs @@ -233,7 +233,6 @@ the future. For more information, see Project { .build() } -#[expect(deprecated)] #[cargo_test] fn profile_selection_build() { let p = all_target_project(); @@ -158,7 +157,6 @@ fn profile_selection_build_release() { .run(); } -#[expect(deprecated)] #[cargo_test] fn profile_selection_build_all_targets() { let p = all_target_project(); diff --git a/tests/testsuite/profile_trim_paths.rs b/tests/testsuite/profile_trim_paths.rs index df2c99f0a60..2adc1897b73 100644 --- a/tests/testsuite/profile_trim_paths.rs +++ b/tests/testsuite/profile_trim_paths.rs @@ -91,7 +91,6 @@ fn release_profile_default_to_object() { .run(); } -#[expect(deprecated)] #[cargo_test(nightly, reason = "-Zremap-path-scope is unstable")] fn one_option() { let build = |option| { @@ -388,7 +387,6 @@ bar-0.0.1/src/lib.rs .run(); } -#[expect(deprecated)] #[cargo_test(nightly, reason = "-Zremap-path-scope is unstable")] fn diagnostics_works() { Package::new("bar", "0.0.1") diff --git a/tests/testsuite/profiles.rs b/tests/testsuite/profiles.rs index dac6e562741..36a70391050 100644 --- a/tests/testsuite/profiles.rs +++ b/tests/testsuite/profiles.rs @@ -439,7 +439,6 @@ fn panic_unwind_does_not_build_twice() { .run(); } -#[expect(deprecated)] #[cargo_test] fn debug_0_report() { // The finished line handles 0 correctly. @@ -584,7 +583,6 @@ fn strip_accepts_true_to_strip_symbols() { .run(); } -#[expect(deprecated)] #[cargo_test] fn strip_accepts_false_to_disable_strip() { let p = project() @@ -670,7 +668,6 @@ fn strip_debuginfo_without_debug() { .run(); } -#[expect(deprecated)] #[cargo_test] fn do_not_strip_debuginfo_with_requested_debug() { let p = project() @@ -834,7 +831,6 @@ Caused by: .run(); } -#[expect(deprecated)] #[cargo_test] fn debug_options_valid() { let build = |option| { diff --git a/tests/testsuite/progress.rs b/tests/testsuite/progress.rs index e6686df8c27..5f9b8d2ebdd 100644 --- a/tests/testsuite/progress.rs +++ b/tests/testsuite/progress.rs @@ -125,7 +125,6 @@ fn always_shows_progress() { .run(); } -#[expect(deprecated)] #[cargo_test] fn never_progress() { const N: usize = 3; diff --git a/tests/testsuite/publish.rs b/tests/testsuite/publish.rs index 62be26c5dd9..417ae89485d 100644 --- a/tests/testsuite/publish.rs +++ b/tests/testsuite/publish.rs @@ -1385,7 +1385,6 @@ You may press ctrl-c to skip waiting; the crate should be available shortly. ); } -#[expect(deprecated)] #[cargo_test] fn publish_checks_for_token_before_verify() { let registry = registry::RegistryBuilder::new() diff --git a/tests/testsuite/rustc.rs b/tests/testsuite/rustc.rs index 71ca898ae16..599438bc09e 100644 --- a/tests/testsuite/rustc.rs +++ b/tests/testsuite/rustc.rs @@ -437,7 +437,6 @@ fn build_only_bar_dependency() { .run(); } -#[expect(deprecated)] #[cargo_test] fn targets_selected_default() { let p = project().file("src/main.rs", "fn main() {}").build(); @@ -589,7 +588,6 @@ fn rustc_with_other_profile() { p.cargo("rustc --profile test").run(); } -#[expect(deprecated)] #[cargo_test] fn rustc_fingerprint() { // Verify that the fingerprint includes the rustc args. diff --git a/tests/testsuite/rustc_info_cache.rs b/tests/testsuite/rustc_info_cache.rs index adf153c82c5..2ef7da92cb4 100644 --- a/tests/testsuite/rustc_info_cache.rs +++ b/tests/testsuite/rustc_info_cache.rs @@ -10,7 +10,6 @@ const MISS: &str = "[..] rustc info cache miss[..]"; const HIT: &str = "[..]rustc info cache hit[..]"; const UPDATE: &str = "[..]updated rustc info cache[..]"; -#[expect(deprecated)] #[cargo_test] fn rustc_info_cache() { let p = project() @@ -106,7 +105,6 @@ fn rustc_info_cache() { .run(); } -#[expect(deprecated)] #[cargo_test] fn rustc_info_cache_with_wrappers() { let wrapper_project = project() diff --git a/tests/testsuite/rustdoc_extern_html.rs b/tests/testsuite/rustdoc_extern_html.rs index 341db1281c6..10856fd87bf 100644 --- a/tests/testsuite/rustdoc_extern_html.rs +++ b/tests/testsuite/rustdoc_extern_html.rs @@ -33,7 +33,6 @@ fn basic_project() -> Project { .build() } -#[expect(deprecated)] #[cargo_test] fn ignores_on_stable() { // Requires -Zrustdoc-map to use. @@ -61,7 +60,6 @@ fn simple() { assert!(myfun.contains(r#"href="https://docs.rs/bar/1.0.0/bar/struct.Straw.html""#)); } -#[expect(deprecated)] #[ignore = "Broken, temporarily disabled until https://github.com/rust-lang/rust/pull/82776 is resolved."] #[cargo_test] // #[cargo_test(nightly, reason = "--extern-html-root-url is unstable")] @@ -451,7 +449,6 @@ fn alt_sparse_registry() { assert!(gold.contains(r#"href="https://docs.rs/grimm/1.0.0/grimm/struct.Gold.html""#)); } -#[expect(deprecated)] #[cargo_test(nightly, reason = "--extern-html-root-url is unstable")] fn same_deps_multi_occurrence_in_dep_tree() { // rust-lang/cargo#13543 diff --git a/tests/testsuite/search.rs b/tests/testsuite/search.rs index 222a15bab2a..87203606714 100644 --- a/tests/testsuite/search.rs +++ b/tests/testsuite/search.rs @@ -178,7 +178,6 @@ fn ignore_quiet() { .run(); } -#[expect(deprecated)] #[cargo_test] fn colored_results() { let registry = setup().build(); diff --git a/tests/testsuite/standard_lib.rs b/tests/testsuite/standard_lib.rs index c4108cdfad3..1a277365797 100644 --- a/tests/testsuite/standard_lib.rs +++ b/tests/testsuite/standard_lib.rs @@ -348,7 +348,6 @@ fn simple_bin_std() { p.cargo("run -v").build_std(&setup).target_host().run(); } -#[expect(deprecated)] #[cargo_test(build_std_mock)] fn lib_nostd() { let setup = setup(); @@ -661,7 +660,6 @@ fn ignores_incremental() { .starts_with("foo-")); } -#[expect(deprecated)] #[cargo_test(build_std_mock)] fn cargo_config_injects_compiler_builtins() { let setup = setup(); @@ -760,7 +758,6 @@ fn proc_macro_only() { .run(); } -#[expect(deprecated)] #[cargo_test(build_std_mock)] fn fetch() { let setup = setup(); diff --git a/tests/testsuite/test.rs b/tests/testsuite/test.rs index a0eb50664e6..dd66bfff003 100644 --- a/tests/testsuite/test.rs +++ b/tests/testsuite/test.rs @@ -1809,7 +1809,6 @@ test test_in_bench ... ok .run(); } -#[expect(deprecated)] #[cargo_test] fn test_run_implicit_example_target() { let prj = project() @@ -1897,7 +1896,6 @@ fn test_run_implicit_example_target() { .run(); } -#[expect(deprecated)] #[cargo_test] fn test_filtered_excludes_compiling_examples() { let p = project() @@ -3596,7 +3594,6 @@ test b ... ok .run(); } -#[expect(deprecated)] #[cargo_test] fn test_virtual_manifest_one_project() { let p = project() @@ -3619,7 +3616,6 @@ fn test_virtual_manifest_one_project() { .run(); } -#[expect(deprecated)] #[cargo_test] fn test_virtual_manifest_glob() { let p = project() @@ -3872,7 +3868,6 @@ fn doctest_and_registry() { p.cargo("test --workspace -v").run(); } -#[expect(deprecated)] #[cargo_test] fn cargo_test_env() { let src = format!( @@ -4567,7 +4562,6 @@ fn doctest_skip_staticlib() { .run(); } -#[expect(deprecated)] #[cargo_test] fn can_not_mix_doc_tests_and_regular_tests() { let p = project() @@ -5419,7 +5413,6 @@ Caused by: .run(); } -#[expect(deprecated)] #[cargo_test] fn nonzero_exit_status() { // Tests for nonzero exit codes from tests. diff --git a/tests/testsuite/warn_on_failure.rs b/tests/testsuite/warn_on_failure.rs index 74d1706b1e1..f5b91597e4b 100644 --- a/tests/testsuite/warn_on_failure.rs +++ b/tests/testsuite/warn_on_failure.rs @@ -77,7 +77,6 @@ fn no_warning_on_success() { .run(); } -#[expect(deprecated)] #[cargo_test] fn no_warning_on_bin_failure() { make_lib(""); @@ -101,7 +100,6 @@ error[E0425]: cannot find function `hi` in this scope .run(); } -#[expect(deprecated)] #[cargo_test] fn warning_on_lib_failure() { make_lib("err()");