File tree Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Expand file tree Collapse file tree 3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -260,4 +260,14 @@ fn issue9192() -> i32 {
260
260
}
261
261
}
262
262
263
+ fn issue9503(x: usize) -> isize {
264
+ unsafe {
265
+ if x > 12 {
266
+ *(x as *const isize)
267
+ } else {
268
+ !*(x as *const isize)
269
+ }
270
+ }
271
+ }
272
+
263
273
fn main() {}
Original file line number Diff line number Diff line change @@ -260,4 +260,14 @@ fn issue9192() -> i32 {
260
260
} ;
261
261
}
262
262
263
+ fn issue9503 ( x : usize ) -> isize {
264
+ unsafe {
265
+ if x > 12 {
266
+ return * ( x as * const isize ) ;
267
+ } else {
268
+ return !* ( x as * const isize ) ;
269
+ } ;
270
+ } ;
271
+ }
272
+
263
273
fn main ( ) { }
Original file line number Diff line number Diff line change @@ -335,5 +335,21 @@ LL | return 0;
335
335
|
336
336
= help: remove `return`
337
337
338
- error: aborting due to 42 previous errors
338
+ error: unneeded `return` statement
339
+ --> $DIR/needless_return.rs:266:13
340
+ |
341
+ LL | return *(x as *const isize);
342
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
343
+ |
344
+ = help: remove `return`
345
+
346
+ error: unneeded `return` statement
347
+ --> $DIR/needless_return.rs:268:13
348
+ |
349
+ LL | return !*(x as *const isize);
350
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
351
+ |
352
+ = help: remove `return`
353
+
354
+ error: aborting due to 44 previous errors
339
355
You can’t perform that action at this time.
0 commit comments