madsmtm / objc2

Bindings to Apple's frameworks in Rust
https://docs.rs/objc2/
MIT License
290 stars 35 forks source link

Restrict `this` parameters to `Self`-like types in `declare_class!` #523

Closed madsmtm closed 8 months ago

madsmtm commented 8 months ago

We don't want to allow e.g. this: &NSString in declare_class!, since that'd not be valid with self: &NSString (and is very likely unsound and undesired anyhow).

Also refactor declare class internals in preparation for https://github.com/madsmtm/objc2/pull/521.