Skip to content

Commit a6cf1be

Browse files
committed
test: Switch from allow to expect deprecated
This caught a couple of lingering items.
1 parent e94fde9 commit a6cf1be

40 files changed

+116
-124
lines changed

tests/testsuite/artifact_dep.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ fn build_script_with_bin_artifact_and_lib_false() {
687687
)
688688
.build();
689689

690-
#[allow(deprecated)]
690+
#[expect(deprecated)]
691691
p.cargo("build -Z bindeps")
692692
.masquerade_as_nightly_cargo(&["bindeps"])
693693
.with_status(101)
@@ -731,7 +731,7 @@ fn lib_with_bin_artifact_and_lib_false() {
731731
)
732732
.build();
733733

734-
#[allow(deprecated)]
734+
#[expect(deprecated)]
735735
p.cargo("build -Z bindeps")
736736
.masquerade_as_nightly_cargo(&["bindeps"])
737737
.with_status(101)
@@ -1117,7 +1117,7 @@ fn build_script_deps_adopt_specified_target_unconditionally() {
11171117
.file("bar/src/lib.rs", "pub fn doit() {}")
11181118
.build();
11191119

1120-
#[allow(deprecated)]
1120+
#[expect(deprecated)]
11211121
p.cargo("check -v -Z bindeps")
11221122
.masquerade_as_nightly_cargo(&["bindeps"])
11231123
.with_stderr_does_not_contain(format!(
@@ -1237,7 +1237,7 @@ fn non_build_script_deps_adopt_specified_target_unconditionally() {
12371237
.file("bar/src/lib.rs", "pub fn doit() {}")
12381238
.build();
12391239

1240-
#[allow(deprecated)]
1240+
#[expect(deprecated)]
12411241
p.cargo("check -v -Z bindeps")
12421242
.masquerade_as_nightly_cargo(&["bindeps"])
12431243
.with_stderr_contains(format!(
@@ -1385,7 +1385,7 @@ fn build_script_deps_adopts_target_platform_if_target_equals_target() {
13851385
.build();
13861386

13871387
let alternate_target = cross_compile::alternate();
1388-
#[allow(deprecated)]
1388+
#[expect(deprecated)]
13891389
p.cargo("check -v -Z bindeps --target")
13901390
.arg(alternate_target)
13911391
.masquerade_as_nightly_cargo(&["bindeps"])

tests/testsuite/build.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn cargo_compile_incremental() {
132132
.run();
133133
}
134134

135-
#[allow(deprecated)]
135+
#[expect(deprecated)]
136136
#[cargo_test]
137137
fn incremental_profile() {
138138
let p = project()
@@ -176,7 +176,7 @@ fn incremental_profile() {
176176
.run();
177177
}
178178

179-
#[allow(deprecated)]
179+
#[expect(deprecated)]
180180
#[cargo_test]
181181
fn incremental_config() {
182182
let p = project()
@@ -1524,7 +1524,6 @@ fn ignores_carriage_return_in_lockfile() {
15241524
p.cargo("build").run();
15251525
}
15261526

1527-
#[allow(deprecated)]
15281527
#[cargo_test]
15291528
fn cargo_default_env_metadata_env_var() {
15301529
// Ensure that path dep + dylib + env_var get metadata
@@ -4124,7 +4123,7 @@ fn panic_abort_compiles_with_panic_abort() {
41244123
.run();
41254124
}
41264125

4127-
#[allow(deprecated)]
4126+
#[expect(deprecated)]
41284127
#[cargo_test]
41294128
fn compiler_json_error_format() {
41304129
let p = project()
@@ -4314,7 +4313,7 @@ fn wrong_message_format_option() {
43144313
.run();
43154314
}
43164315

4317-
#[allow(deprecated)]
4316+
#[expect(deprecated)]
43184317
#[cargo_test]
43194318
fn message_format_json_forward_stderr() {
43204319
let p = project()
@@ -5177,7 +5176,7 @@ WRAPPER CALLED: rustc --crate-name foo [..]
51775176
.run();
51785177
}
51795178

5180-
#[allow(deprecated)]
5179+
#[expect(deprecated)]
51815180
#[cargo_test]
51825181
fn rustc_wrapper_queries() {
51835182
// Check that the invocations querying rustc for information are done with the wrapper.
@@ -5917,7 +5916,7 @@ fn build_filter_infer_profile() {
59175916
.run();
59185917
}
59195918

5920-
#[allow(deprecated)]
5919+
#[expect(deprecated)]
59215920
#[cargo_test]
59225921
fn targets_selected_default() {
59235922
let p = project().file("src/main.rs", "fn main() {}").build();
@@ -6871,7 +6870,7 @@ Caused by:
68716870
.run();
68726871
}
68736872

6874-
#[allow(deprecated)]
6873+
#[expect(deprecated)]
68756874
#[cargo_test]
68766875
fn build_script_o0_default() {
68776876
let p = project()
@@ -6884,7 +6883,7 @@ fn build_script_o0_default() {
68846883
.run();
68856884
}
68866885

6887-
#[allow(deprecated)]
6886+
#[expect(deprecated)]
68886887
#[cargo_test]
68896888
fn build_script_o0_default_even_with_release() {
68906889
let p = project()

tests/testsuite/build_script.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3779,7 +3779,7 @@ fn custom_target_dir() {
37793779
p.cargo("build -v").run();
37803780
}
37813781

3782-
#[allow(deprecated)]
3782+
#[expect(deprecated)]
37833783
#[cargo_test]
37843784
fn panic_abort_with_build_scripts() {
37853785
let p = project()

tests/testsuite/build_script_extra_link_arg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ the future. For more information, see <https://github.com/rust-lang/cargo/issues
233233
.run();
234234
}
235235

236-
#[allow(deprecated)]
236+
#[expect(deprecated)]
237237
#[cargo_test]
238238
fn link_arg_transitive_not_allowed() {
239239
// Verify that transitive dependencies don't pass link args.

tests/testsuite/cache_messages.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ WRAPPER CALLED: rustc [..]
527527
.run();
528528
}
529529

530-
#[allow(deprecated)]
530+
#[expect(deprecated)]
531531
#[cargo_test]
532532
fn wacky_hashless_fingerprint() {
533533
// On Windows, executables don't have hashes. This checks for a bad

tests/testsuite/cargo_command.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ fn list_command_looks_at_path_case_mismatch() {
137137
);
138138
}
139139

140-
#[allow(deprecated)]
140+
#[expect(deprecated)]
141141
#[cargo_test]
142142
fn list_command_handles_known_external_commands() {
143143
let p = project()
@@ -358,7 +358,7 @@ fn override_cargo_home() {
358358
assert!(paths::root().join("foo2/.git").is_dir());
359359
}
360360

361-
#[allow(deprecated)]
361+
#[expect(deprecated)]
362362
#[cargo_test]
363363
fn cargo_subcommand_env() {
364364
let src = format!(

tests/testsuite/check.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ fn check_all() {
406406
.run();
407407
}
408408

409-
#[allow(deprecated)]
409+
#[expect(deprecated)]
410410
#[cargo_test]
411411
fn check_all_exclude() {
412412
let p = project()
@@ -433,7 +433,7 @@ fn check_all_exclude() {
433433
.run();
434434
}
435435

436-
#[allow(deprecated)]
436+
#[expect(deprecated)]
437437
#[cargo_test]
438438
fn check_all_exclude_glob() {
439439
let p = project()
@@ -491,7 +491,7 @@ fn check_virtual_all_implied() {
491491
.run();
492492
}
493493

494-
#[allow(deprecated)]
494+
#[expect(deprecated)]
495495
#[cargo_test]
496496
fn check_virtual_manifest_one_project() {
497497
let p = project()
@@ -518,7 +518,7 @@ fn check_virtual_manifest_one_project() {
518518
.run();
519519
}
520520

521-
#[allow(deprecated)]
521+
#[expect(deprecated)]
522522
#[cargo_test]
523523
fn check_virtual_manifest_glob() {
524524
let p = project()
@@ -559,7 +559,7 @@ fn exclude_warns_on_non_existing_package() {
559559
.run();
560560
}
561561

562-
#[allow(deprecated)]
562+
#[expect(deprecated)]
563563
#[cargo_test]
564564
fn targets_selected_default() {
565565
let foo = project()
@@ -633,7 +633,7 @@ error[E0425]: cannot find value `badtext` in this scope
633633
.run();
634634
}
635635

636-
#[allow(deprecated)]
636+
#[expect(deprecated)]
637637
// Verify what is checked with various command-line filters.
638638
#[cargo_test]
639639
fn check_filters() {
@@ -1000,7 +1000,7 @@ WRAPPER CALLED: rustc --crate-name foo [..]
10001000
.run();
10011001
}
10021002

1003-
#[allow(deprecated)]
1003+
#[expect(deprecated)]
10041004
#[cargo_test]
10051005
fn rustc_workspace_wrapper_respects_primary_units() {
10061006
let p = project()
@@ -1024,7 +1024,7 @@ fn rustc_workspace_wrapper_respects_primary_units() {
10241024
.run();
10251025
}
10261026

1027-
#[allow(deprecated)]
1027+
#[expect(deprecated)]
10281028
#[cargo_test]
10291029
fn rustc_workspace_wrapper_excludes_published_deps() {
10301030
let p = project()

0 commit comments

Comments
 (0)