-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Tracking issue for the functions for debug escaping char_escape_debug
#35068
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
Comments
I hope this is the correct spot to mention that all examples of std::char::escape_debug use std::char::escape_default. https://doc.rust-lang.org/std/primitive.char.html#method.escape_debug |
The above has been fixed; the function is correctly documented. Nominating for libs team discussion as to stabilization, I don't think we're going to get much information out of usage since this is such a niche API. I'm personally not certain I like the name: cc @rust-lang/libs |
I would prefer to call these functions just (I don't suggest ever removing |
@rfcbot fcp merge |
Team member @sfackler has proposed to merge this. The next step is review by the rest of the tagged teams: Concerns:
Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Sorry, but I've lost context on this change and this issue doesn't appear to link to anything. What is the purpose of this new method? Is it just a rename? |
The function escapes characters the way the |
If we are doing this, I would also like to have a plan for #27791 which includes @rfcbot concern str |
Please change this sentence in the docs: "This will escape the characters similar to the Debug implementations of str or char." I assume this is not just similar, it is the implementation of 'Debug'. |
Currently. What if we wanted to change either of these but not the other? |
Maybe we could state that it does the same as the |
The only difference between |
@ariasuni It's the other way around, the |
Oh, that explains a lot. So what does |
It's supposed to decide whether a codepoint is printed directly in the
|
I get it, I’m wondering on what properties/logic this choice is based. Reading the (undocumented) source code is not helpful… I just understand that it’s based on the Unicode character class (also it probably should be updated for Unicode 10.0.0). |
See the original pull request: #34485. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
Stabilizes: * `<char>::escape_debug` * `std::char::EscapeDebug` Closes rust-lang#35068
I'm not sure of a better place to put this. Is this function guaranteed so that |
std::char::escape_debug
,std::char::EscapeDebug
.The text was updated successfully, but these errors were encountered: