Skip to content

panic!("{}") doesn't error out on compilation #30026

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
mkpankov opened this issue Nov 24, 2015 · 2 comments
Closed

panic!("{}") doesn't error out on compilation #30026

mkpankov opened this issue Nov 24, 2015 · 2 comments

Comments

@mkpankov
Copy link
Contributor

Playground: http://is.gd/jaT7YG

IMO the behavior should be consistent with println!.

@solson
Copy link
Member

solson commented Nov 24, 2015

This happens since panic! special cases the one-argument case to not go through format_args!. It would be nice to have the message checked in this case anyway to make sure it doesn't have any un-escaped {}s, but it's not clear to me how we should do that.

@jonas-schievink
Copy link
Contributor

Duplicate of #22932

@jdm jdm closed this as completed Nov 24, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants