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

Be smarter about string escaping #60

Closed
Eijebong opened this issue Jan 23, 2018 · 1 comment · Fixed by #171
Closed

Be smarter about string escaping #60

Eijebong opened this issue Jan 23, 2018 · 1 comment · Fixed by #171

Comments

@Eijebong
Copy link

Something like

proc_macro2::Literal::string(&format!("Couldn't find {}", class_name));

will end up as "Couldn\'t find SomeProtocol" when used in quote!
Since we're in a string surrounded by double quotes, the escaping there is useless.

@dtolnay
Copy link
Owner

dtolnay commented Mar 10, 2019

Thanks! I would accept a PR to fix this.

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 a pull request may close this issue.

2 participants