File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,12 @@ macro_rules! unsafe_fn {
101101 // an array/slice and then it's indexed with array access suffix [usize_idx].
102102 (
103103 if false {
104+ #[ deny( unused_unsafe) ]
104105 let _ = $fn;
105- $( let _ = $arg; ) *
106+ $(
107+ #[ deny( unused_unsafe) ]
108+ let _ = $arg;
109+ ) *
106110 unreachable!( )
107111 } else {
108112 #[ allow( unsafe_code) ]
@@ -211,6 +215,7 @@ macro_rules! unsafe_method_internal {
211215 // **static** variable.
212216 let rref = {
213217 #[ rustfmt:: skip]
218+ #[ deny( unused_unsafe) ]
214219 // @TODO simplify once https://github.com/rust-lang/rust/issues/15701
215220 // (attributes on expressions)
216221 #[ deny( unsafe_code) ]
@@ -240,7 +245,10 @@ macro_rules! unsafe_method_internal {
240245 // 2. #[deny(unused_unsafe)]
241246 let _ = unsafe { owned_receiver. $fn( $( $arg ) ,* ) } ;
242247 } else {
243- $( let _ = $arg; ) *
248+ $(
249+ #[ deny( unused_unsafe) ]
250+ let _ = $arg;
251+ ) *
244252 }
245253 unreachable!( )
246254 } else {
You can’t perform that action at this time.
0 commit comments