Skip to content

Commit 684079a

Browse files
committed
Fix some dead_code warnings in the tests with latest nightly compiler
These structs are never constructed, and the latest nightly no longer considers a trait impl as enough to keep the struct "live". rust-lang/rust#125572
1 parent 1234ddc commit 684079a

3 files changed

+5
-5
lines changed

mockall/tests/automock_generic_struct.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use mockall::*;
66

77
pub struct GenericStruct<T, V> {
8-
_t: T,
9-
_v: V
8+
pub t: T,
9+
pub v: V
1010
}
1111
#[automock]
1212
impl<T, V> GenericStruct<T, V> {

mockall/tests/automock_generic_struct_with_bounds.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use mockall::*;
66

77
pub struct GenericStruct<T: Copy, V: Clone> {
8-
_t: T,
9-
_v: V
8+
pub t: T,
9+
pub v: V
1010
}
1111
#[automock]
1212
impl<T: Copy + Copy, V: Clone + Copy> GenericStruct<T, V> {

mockall/tests/automock_generic_struct_with_where_clause.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use mockall::*;
66

77
pub struct GenericStruct<T> {
8-
_t: T,
8+
pub t: T,
99
}
1010
#[automock]
1111
impl<T> GenericStruct<T>

0 commit comments

Comments
 (0)