Skip to content

#fmt should generate compile errors for invalid format strings #1652

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

Closed
brson opened this issue Jan 24, 2012 · 2 comments
Closed

#fmt should generate compile errors for invalid format strings #1652

brson opened this issue Jan 24, 2012 · 2 comments
Labels
A-syntaxext Area: Syntax extensions E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Jan 24, 2012

I believe its possible to specify invalid combinations of options in #fmt strings and I don't know what happens at runtime. printnf just allows undefined behavior, but we can make them compile errors.

@sanxiyn
Copy link
Member

sanxiyn commented Jan 25, 2013

fmt! generates compile errors now. If there are cases not covered, I think it would be best to open new issues for them.

@brson
Copy link
Contributor Author

brson commented Jan 26, 2013

Ok

@brson brson closed this as completed Jan 26, 2013
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Since the MIR linker hasn't been hooked up yet, the compiler will fail
if this option is selected as shown by the new tests.
Kobzol pushed a commit to Kobzol/rust that referenced this issue Dec 30, 2024
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants