forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#10942 - Centri3:unnecessary_cast, r=llogiq
Ignore more type aliases in `unnecessary_cast` This is potentially the worst code I've ever written, and even if not, it's very close to being on par with starb. This will ignore `call() as i32` and `local_obtained_from_call as i32` now. This should fix every reasonable way to reproduce rust-lang#10555, but likely not entirely. changelog: Ignore more type aliases in `unnecessary_cast`
- Loading branch information
Showing
5 changed files
with
166 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#![allow(nonstandard_style)] | ||
#![allow(clippy::missing_safety_doc, unused)] | ||
|
||
type pid_t = i32; | ||
pub unsafe fn getpid() -> pid_t { | ||
pid_t::from(0) | ||
} | ||
pub fn getpid_SAFE_TRUTH() -> pid_t { | ||
unsafe { getpid() } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.