servo / cocoa-rs

DEPRECATED - Cocoa/Objective-C bindings for the Rust programming language
https://github.com/servo/core-foundation-rs/
Other
286 stars 72 forks source link

Compile NSValue on macOS only #176

Closed ratake closed 6 years ago

ratake commented 6 years ago

Because it depends on NSSize/NSPoint. This fixes the build on iOS.


This change is Reviewable

jdm commented 6 years ago
error[E0412]: cannot find type `id` in this scope

   --> src/foundation.rs:144:62

    |

144 |         unsafe fn valueWithPoint(_: Self, point: NSPoint) -> id {

    |                                                              ^^ did you mean `i8`?

    |

help: possible candidate is found in another module, you can import it into scope

    |

32  |     use base::id;

    |

error[E0425]: cannot find function `class` in this scope

   --> src/foundation.rs:145:23

    |

145 |             msg_send![class("NSValue"), valueWithPoint:point]

    |                       ^^^^^ not found in this scope

    |

help: possible candidate is found in another module, you can import it into scope

    |

32  |     use base::class;

    |

error[E0412]: cannot find type `id` in this scope

   --> src/foundation.rs:148:59

    |

148 |         unsafe fn valueWithSize(_: Self, size: NSSize) -> id {

    |                                                           ^^ did you mean `i8`?

    |

help: possible candidate is found in another module, you can import it into scope

    |

32  |     use base::id;

    |

error[E0425]: cannot find function `class` in this scope

   --> src/foundation.rs:149:23

    |

149 |             msg_send![class("NSValue"), valueWithSize:size]

    |                       ^^^^^ not found in this scope

    |

help: possible candidate is found in another module, you can import it into scope

    |

32  |     use base::class;

    |

error[E0412]: cannot find type `id` in this scope

   --> src/foundation.rs:153:22

    |

153 |     impl NSValue for id {

    |                      ^^ did you mean `i8`?

    |

help: possible candidate is found in another module, you can import it into scope

    |

32  |     use base::id;

    |

error: aborting due to 5 previous errors

error: Could not compile `cocoa`.
ratake commented 6 years ago

Updated!

jdm commented 6 years ago

@bors-servo: r+

bors-servo commented 6 years ago

:pushpin: Commit f37a465 has been approved by jdm

bors-servo commented 6 years ago

:hourglass: Testing commit f37a465990e9835dc8bf95b44566f40123a2f579 with merge 16cf14c43022a9f2e75d6743e86282e419360680...

bors-servo commented 6 years ago

:sunny: Test successful - status-travis Approved by: jdm Pushing 16cf14c43022a9f2e75d6743e86282e419360680 to master...