Skip to content

Commit

Permalink
fix unused variable in checks
Browse files Browse the repository at this point in the history
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
hawkw committed Apr 3, 2020
1 parent 703fc64 commit ed6ea4e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tokio/src/sync/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ fn bounds() {
fn check_send<T: Send>() {}
fn check_unpin<T: Unpin>() {}
// This has to take a value, since the async fn's return type is unnameable.
fn check_send_sync_val<T: Send + Sync>(t: T) {}
fn check_send_sync_val<T: Send + Sync>(_t: T) {}
fn check_send_sync<T: Send + Sync>() {}
check_send::<MutexGuard<'_, u32>>();
check_unpin::<Mutex<u32>>();
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/sync/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ fn bounds() {
fn check_sync<T: Sync>() {}
fn check_unpin<T: Unpin>() {}
// This has to take a value, since the async fn's return type is unnameable.
fn check_send_sync_val<T: Send + Sync>(t: T) {}
fn check_send_sync_val<T: Send + Sync>(_t: T) {}

check_send::<RwLock<u32>>();
check_sync::<RwLock<u32>>();
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/sync/semaphore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub struct TryAcquireError(());
fn bounds() {
fn check_unpin<T: Unpin>() {}
// This has to take a value, since the async fn's return type is unnameable.
fn check_send_sync_val<T: Send + Sync>(t: T) {}
fn check_send_sync_val<T: Send + Sync>(_t: T) {}
fn check_send_sync<T: Send + Sync>() {}
check_unpin::<Semaphore>();
check_unpin::<SemaphorePermit<'_>>();
Expand Down

0 comments on commit ed6ea4e

Please sign in to comment.