From 684079a182194cc05f590bcc3c3307de391b843c Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sun, 9 Jun 2024 12:16:58 -0600 Subject: [PATCH] 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". https://github.com/rust-lang/rust/pull/125572 --- mockall/tests/automock_generic_struct.rs | 4 ++-- mockall/tests/automock_generic_struct_with_bounds.rs | 4 ++-- mockall/tests/automock_generic_struct_with_where_clause.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mockall/tests/automock_generic_struct.rs b/mockall/tests/automock_generic_struct.rs index 2efaba3c..e67bfbaf 100644 --- a/mockall/tests/automock_generic_struct.rs +++ b/mockall/tests/automock_generic_struct.rs @@ -5,8 +5,8 @@ use mockall::*; pub struct GenericStruct { - _t: T, - _v: V + pub t: T, + pub v: V } #[automock] impl GenericStruct { diff --git a/mockall/tests/automock_generic_struct_with_bounds.rs b/mockall/tests/automock_generic_struct_with_bounds.rs index b7ba3b43..f7cb92f5 100644 --- a/mockall/tests/automock_generic_struct_with_bounds.rs +++ b/mockall/tests/automock_generic_struct_with_bounds.rs @@ -5,8 +5,8 @@ use mockall::*; pub struct GenericStruct { - _t: T, - _v: V + pub t: T, + pub v: V } #[automock] impl GenericStruct { diff --git a/mockall/tests/automock_generic_struct_with_where_clause.rs b/mockall/tests/automock_generic_struct_with_where_clause.rs index f62996fb..680dde3f 100644 --- a/mockall/tests/automock_generic_struct_with_where_clause.rs +++ b/mockall/tests/automock_generic_struct_with_where_clause.rs @@ -5,7 +5,7 @@ use mockall::*; pub struct GenericStruct { - _t: T, + pub t: T, } #[automock] impl GenericStruct