mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
parent
cda7547394
commit
b333645971
@ -260,4 +260,14 @@ fn issue9192() -> i32 {
|
||||
}
|
||||
}
|
||||
|
||||
fn issue9503(x: usize) -> isize {
|
||||
unsafe {
|
||||
if x > 12 {
|
||||
*(x as *const isize)
|
||||
} else {
|
||||
!*(x as *const isize)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -260,4 +260,14 @@ fn issue9192() -> i32 {
|
||||
};
|
||||
}
|
||||
|
||||
fn issue9503(x: usize) -> isize {
|
||||
unsafe {
|
||||
if x > 12 {
|
||||
return *(x as *const isize);
|
||||
} else {
|
||||
return !*(x as *const isize);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -335,5 +335,21 @@ LL | return 0;
|
||||
|
|
||||
= help: remove `return`
|
||||
|
||||
error: aborting due to 42 previous errors
|
||||
error: unneeded `return` statement
|
||||
--> $DIR/needless_return.rs:266:13
|
||||
|
|
||||
LL | return *(x as *const isize);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: remove `return`
|
||||
|
||||
error: unneeded `return` statement
|
||||
--> $DIR/needless_return.rs:268:13
|
||||
|
|
||||
LL | return !*(x as *const isize);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: remove `return`
|
||||
|
||||
error: aborting due to 44 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user