Skip to content

Replace interpolate_idents with stable code #185

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

Merged
merged 1 commit into from
Nov 3, 2018
Merged

Replace interpolate_idents with stable code #185

merged 1 commit into from
Nov 3, 2018

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Nov 3, 2018

@@ -89,15 +89,15 @@ macro_rules! impl_from_array {
let array_from_vec = <[$elem_ty; $elem_count]>::from(vec);
// FIXME: Workaround for arrays with more than 32 elements.
for i in 0..$elem_count {
assert_eq!(array_from_vec[[i]], array[[i]]);
assert_eq!(array_from_vec[i], array[i]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so great! Thank you!

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 3, 2018

@dtolnay It looks like some fmt tests are failing because stringify!($id) expands to"$id " instead of just "$id".

@dtolnay
Copy link
Member Author

dtolnay commented Nov 3, 2018

I believe this was a compiler bug: rust-lang/rust#55658. I implemented a workaround in paste 0.1.3.

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 3, 2018

Thank you so so much, this is so awesome!

@gnzlbg gnzlbg merged commit ba83765 into rust-lang:master Nov 3, 2018
@dtolnay dtolnay deleted the paste branch November 3, 2018 23:17
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

Successfully merging this pull request may close these issues.

2 participants