Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions crossbeam-channel/src/select_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,6 @@ macro_rules! crossbeam_channel_internal {
let _oper = $crate::internal::select(&mut $sel);

// Erase the lifetime so that `sel` can be dropped early even without NLL.
#[allow(unsafe_code)]
unsafe { ::std::mem::transmute(_oper) }
};

Expand All @@ -852,7 +851,6 @@ macro_rules! crossbeam_channel_internal {
let _oper = $crate::internal::try_select(&mut $sel);

// Erase the lifetime so that `sel` can be dropped early even without NLL.
#[allow(unsafe_code)]
unsafe { ::std::mem::transmute(_oper) }
};

Expand Down Expand Up @@ -883,7 +881,6 @@ macro_rules! crossbeam_channel_internal {
let _oper = $crate::internal::select_timeout(&mut $sel, $timeout);

// Erase the lifetime so that `sel` can be dropped early even without NLL.
#[allow(unsafe_code)]
unsafe { ::std::mem::transmute(_oper) }
};

Expand Down Expand Up @@ -922,7 +919,6 @@ macro_rules! crossbeam_channel_internal {
) => {{
match $r {
ref _r => {
#[allow(unsafe_code)]
let $var: &$crate::Receiver<_> = unsafe {
let _r: &$crate::Receiver<_> = _r;

Expand Down Expand Up @@ -955,7 +951,6 @@ macro_rules! crossbeam_channel_internal {
) => {{
match $s {
ref _s => {
#[allow(unsafe_code)]
let $var: &$crate::Sender<_> = unsafe {
let _s: &$crate::Sender<_> = _s;

Expand Down
2 changes: 1 addition & 1 deletion crossbeam-channel/tests/select_macro.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Tests for the `select!` macro.

#![deny(unsafe_code)]
#![forbid(unsafe_code)] // select! is safe.

#[macro_use]
extern crate crossbeam_channel;
Expand Down