Skip to content

partialEq for Span #154

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

Closed
pkpkpk opened this issue Nov 21, 2018 · 7 comments
Closed

partialEq for Span #154

pkpkpk opened this issue Nov 21, 2018 · 7 comments

Comments

@pkpkpk
Copy link

pkpkpk commented Nov 21, 2018

This was added in #68 and has since been removed. Can it be re-introduced or put under a flag?

@dtolnay
Copy link
Owner

dtolnay commented Nov 21, 2018

We follow the API of the compiler's proc_macro::Span. It looks like proc_macro::Span had PartialEq back when #68 was merged but no longer does. Could you help track down where it was removed upstream to confirm the reason?

@pkpkpk
Copy link
Author

pkpkpk commented Nov 21, 2018

Ok I will try!

@pkpkpk
Copy link
Author

pkpkpk commented Nov 21, 2018

Looks like it was removed here: reorganize public API

@dtolnay
Copy link
Owner

dtolnay commented Nov 21, 2018

Could you say more about your use case for this impl? Then we can check with alexcrichton or petrochenkov how we can support that use case. What is your code doing that needs PartialEq on Span?

@pkpkpk
Copy link
Author

pkpkpk commented Nov 21, 2018

I am trying to write fixtures and tests for some parsing code similar to wasm-bindgen's parser. Incidentally, the removal of partialeq breaks WB's 'extra-traits' feature.

@dtolnay
Copy link
Owner

dtolnay commented Nov 21, 2018

Is there any meaning to comparing the spans in that case, or is it only to make it convenient to derive PartialEq rather than implement by hand in a way that ignores spans?

@dtolnay
Copy link
Owner

dtolnay commented Apr 22, 2019

Closing as this was rejected in rust-lang/rust#59070.

@dtolnay dtolnay closed this as completed Apr 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants