-
Notifications
You must be signed in to change notification settings - Fork 13.8k
add trait impls to proc_macro::Ident #146553
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
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @petrochenkov. Use |
55be783
to
fee6f71
Compare
This comment has been minimized.
This comment has been minimized.
fee6f71
to
624c863
Compare
This comment has been minimized.
This comment has been minimized.
624c863
to
509f080
Compare
This comment has been minimized.
This comment has been minimized.
509f080
to
8bc4c57
Compare
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
Clippy context: An aux crate (proc_macros.rs) was using |
I suggest splitting this into one PR with (insta-stable) API changes, and then another PR with implementation optimizations. Also, |
To clarify, the clippy change was to fix CI. Thanks for the context! I'd be happy to remove the |
@rustbot ready |
This was about moving the code around and providing the optimized implementation instead of just doing The |
Reminder, once the PR becomes ready for a review, use |
Symbol: PartialEq<str>, | ||
T: AsRef<str> + ?Sized, | ||
{ | ||
fn eq(&self, other: &T) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@petrochenkov I'm a little confused. Do you mean that this implementation should be reduced to self.to_string() == other.as_ref()
? That seems to miss the point of the ACP, which was to compare Ident
s with String
s (and friends) without an allocation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean that this implementation should be reduced to self.to_string() == other.as_ref()?
Yes.
Allocation or not is an implementation detail, that can be changed at any later point without any process or team decisions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you push the changes?
I still see all the unnecessary code moving and optimizations.
@rustbot ready |
☔ The latest upstream changes (presumably #147475) made this pull request unmergeable. Please resolve the merge conflicts. |
ACP: rust-lang/libs-team#573