Fix unused code warnings in tests (using black_box)

Signed-off-by: Justus Flügel <justusfluegel@gmail.com>
This commit is contained in:
Justus Flügel 2025-03-10 21:58:10 +01:00 committed by Justus Fluegel
parent ff32d81cb0
commit bc7b842ca3
No known key found for this signature in database
GPG Key ID: DD4B1903FEACCC4D
1 changed files with 9 additions and 0 deletions

View File

@ -159,6 +159,9 @@ fn transparent_generic() {
Custom,
}
std::hint::black_box(Combined::<i32>::Other(1));
std::hint::black_box(Combined::<i32>::Custom);
assert_impl_diagnostic::<Combined<miette::MietteDiagnostic>>();
}
@ -260,6 +263,9 @@ fn generic_diagnostic_source() {
Custom,
}
std::hint::black_box(Combined::<i32>::Other(1));
std::hint::black_box(Combined::<i32>::Custom);
assert_impl_diagnostic::<Combined<miette::MietteDiagnostic>>();
}
@ -273,5 +279,8 @@ fn generic_not_influencing_default() {
Custom,
}
std::hint::black_box(Combined::<i32>::Other(1));
std::hint::black_box(Combined::<i32>::Custom);
assert_impl_diagnostic::<Combined<i32>>();
}