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

%? in fmt!() with string arg incorrectly escapes single-quotes #8743

Closed
lilyball opened this issue Aug 25, 2013 · 0 comments
Closed

%? in fmt!() with string arg incorrectly escapes single-quotes #8743

lilyball opened this issue Aug 25, 2013 · 0 comments

Comments

@lilyball
Copy link
Contributor

When using %? to format a string arg to fmt!(), any single-quotes in the string are escaped, even though single-quotes are not special characters within double-quoted strings.

printfln!("%?", "foo 'bar'");

prints

"foo \'bar\'"
bors added a commit that referenced this issue Sep 7, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue May 5, 2022
…pub-crate, r=llogiq

ignore `redundant_pub_crate` in `useless_attribute`

changelog: [`useless_attribute`] no longer lints [`redundant_pub_crate`]

As mentioned in rust-lang/rust-clippy#8732 (comment)

> And it turns out I can't even explicitly allow it at the usage site, because then `clippy::useless_attribute` fires (which would also be a FP?), which is deny-by-default.
>
> Though it does work if I then allow `clippy::useless_attribute`. 😂
>
> ```rust
> #[allow(clippy::useless_attribute)]
> #[allow(clippy::redundant_pub_crate)]
> pub(crate) use bit;
> ```
>
> The originally-reported warning now no longer occurs.
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.

1 participant