Skip to content
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

Implement Deref<T> and DerefMut<T> for JS<T> #2078

Closed
mbrubeck opened this issue Apr 9, 2014 · 1 comment
Closed

Implement Deref<T> and DerefMut<T> for JS<T> #2078

mbrubeck opened this issue Apr 9, 2014 · 1 comment

Comments

@mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented Apr 9, 2014

The new std::ops::Deref and DerefMut traits allow "smart pointer" types to override the * (dereference) operator and gain the same auto-dereferencing behavior as built-in pointer types. Implementing these for JS<T> would reduce some boilerplate in Servo code.

I have a working implementation here, but it's not very useful until rust-lang/rust#12825 is fixed (since that bug causes errors in many common scenarios):

https://github.com/mbrubeck/servo/tree/deref-js

@mbrubeck
Copy link
Contributor Author

@mbrubeck mbrubeck commented Apr 16, 2014

Obsoleted by #2101.

@mbrubeck mbrubeck closed this Apr 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.