Closed
Description
The original hesitation around these impls was whether to consider things equal that have different Span
s.
I propose that if somebody is writing a macro that relies on knowing whether two tokens are the very same down to their syntax context, we should consider that an unhelpable case of "doing it wrong." On the other hand comparing the text of an Ident is quite common and perfectly correct. For example when iterating through field attributes in a custom derive to handle something like #[serde(rename = "...")]
it makes sense to compare whether the idents in the token stream are == i_serde
or == i_rename
.
tracking issue: #38356
cc @Eijebong @alexcrichton