-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying a type to use for parameter-less "static" default methods in a trait #17
Comments
The #18 pull request uses that work around for now. Possibly related: |
Now this is possible to remove dummy parameter in fn type_id(dummy: Option<Self>) -> CFTypeID; I was thinking about deprecation of this function and adding new one but I can't to come up with new name. |
I don’t think we’re making any API stability promises for this library. Feel free to just remove the dummy parameter. If you also want to patch Servo and related libraries to use this change, that’d be great! |
Closes servo#17 Now call like: `let id = <CFBoolean as TCFType<_>>::type_id();` [breaking-change]
Introduce a more convenient notation and embrace dynamic typing.
<T>
in this line is no longer valid in Rust master:https://github.com/mozilla-servo/rust-core-foundation/blob/1f43d00330/base.rs#L57
Having a dummy parameter of type
Option<Self>
could work, but refactoring across repositories this will be a pain. (Not to mention how ugly it is.)The text was updated successfully, but these errors were encountered: