@@ -128,7 +128,7 @@ fn test_slice() {
128
128
fn test_bounds_check_1 ( ) {
129
129
let val: & mut [ u32 ] = & mut [ 1 , 2 , 3 ] ;
130
130
let volatile = unsafe { VolatilePtr :: new ( NonNull :: from ( val) ) } ;
131
- volatile. index ( 3 ) ;
131
+ let _ = volatile. index ( 3 ) ;
132
132
}
133
133
134
134
#[ cfg( feature = "unstable" ) ]
@@ -138,7 +138,7 @@ fn test_bounds_check_2() {
138
138
let val: & mut [ u32 ] = & mut [ 1 , 2 , 3 ] ;
139
139
let volatile = unsafe { VolatilePtr :: new ( NonNull :: from ( val) ) } ;
140
140
#[ allow( clippy:: reversed_empty_ranges) ]
141
- volatile. index ( 2 ..1 ) ;
141
+ let _ = volatile. index ( 2 ..1 ) ;
142
142
}
143
143
144
144
#[ cfg( feature = "unstable" ) ]
@@ -147,7 +147,7 @@ fn test_bounds_check_2() {
147
147
fn test_bounds_check_3 ( ) {
148
148
let val: & mut [ u32 ] = & mut [ 1 , 2 , 3 ] ;
149
149
let volatile = unsafe { VolatilePtr :: new ( NonNull :: from ( val) ) } ;
150
- volatile. index ( 4 ..) ; // `3..` is is still ok (see next test)
150
+ let _ = volatile. index ( 4 ..) ; // `3..` is is still ok (see next test)
151
151
}
152
152
153
153
#[ cfg( feature = "unstable" ) ]
@@ -164,7 +164,7 @@ fn test_bounds_check_4() {
164
164
fn test_bounds_check_5 ( ) {
165
165
let val: & mut [ u32 ] = & mut [ 1 , 2 , 3 ] ;
166
166
let volatile = unsafe { VolatilePtr :: new ( NonNull :: from ( val) ) } ;
167
- volatile. index ( ..4 ) ;
167
+ let _ = volatile. index ( ..4 ) ;
168
168
}
169
169
170
170
#[ cfg( feature = "unstable" ) ]
0 commit comments