Repository navigation
printf: quote ignored chars in the character constant warning - #16509
Merged
Merged
Conversation
escape and quote the trailing chars the same way the other numeric errors quote their input, so 'ABC now warns about 'BC' instead of BC.
sylvestre
reviewed
Nov 15, 2026
| locale_aware_escape_name(OsStr::new(&rest), QuotingStyle::Escape); | ||
| show_warning!( | ||
| "{rest}: character(s) following character constant have been ignored" | ||
| "{}: character(s) following character constant have been ignored", |
Contributor
There was a problem hiding this comment.
please use translate!()
(i didn't realized that we didn't have that before)
46 of 74 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the character constant warning printed the ignored chars raw, so
printf '%x\n' "'ABC"warned aboutBCinstead of'BC'. now they get escaped and quoted the same way the other numeric errors quote their input, so a tab shows up as'\tW'. updated the existing expectations and added a tab case. the ignored test from #16493 should pass with this.Fixes #16494