forked from rust-lang/rust-bindgen
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ir: Whitelist items that don't generate code to improve derive behavior.
When not whitelisting recursively. Fixes rust-lang#1454
- Loading branch information
Showing
5 changed files
with
48 additions
and
56 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
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 |
---|---|---|
@@ -1,18 +1,22 @@ | ||
/* automatically generated by rust-bindgen */ | ||
|
||
|
||
#![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] | ||
|
||
#![cfg(target_os="macos")] | ||
#![allow( | ||
dead_code, | ||
non_snake_case, | ||
non_camel_case_types, | ||
non_upper_case_globals | ||
)] | ||
#![cfg(target_os = "macos")] | ||
|
||
#[macro_use] | ||
extern crate objc; | ||
#[allow(non_camel_case_types)] | ||
pub type id = *mut objc::runtime::Object; | ||
pub trait Foo { | ||
unsafe fn get(self) | ||
-> *mut ObjectType; | ||
unsafe fn get(self) -> u64; | ||
} | ||
impl Foo for id { | ||
unsafe fn get(self) -> *mut ObjectType { msg_send!(self , get) } | ||
unsafe fn get(self) -> u64 { | ||
msg_send!(self, get) | ||
} | ||
} |
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