File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -377,6 +377,8 @@ impl char {
377
377
/// ```
378
378
/// assert_eq!('❤'.escape_unicode().to_string(), "\\u{2764}");
379
379
/// ```
380
+ #[ must_use = "this returns the escaped char as an iterator, \
381
+ without modifying the original"]
380
382
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
381
383
#[ inline]
382
384
pub fn escape_unicode ( self ) -> EscapeUnicode {
@@ -453,6 +455,8 @@ impl char {
453
455
/// ```
454
456
/// assert_eq!('\n'.escape_debug().to_string(), "\\n");
455
457
/// ```
458
+ #[ must_use = "this returns the escaped char as an iterator, \
459
+ without modifying the original"]
456
460
#[ stable( feature = "char_escape_debug" , since = "1.20.0" ) ]
457
461
#[ inline]
458
462
pub fn escape_debug ( self ) -> EscapeDebug {
@@ -507,6 +511,8 @@ impl char {
507
511
/// ```
508
512
/// assert_eq!('"'.escape_default().to_string(), "\\\"");
509
513
/// ```
514
+ #[ must_use = "this returns the escaped char as an iterator, \
515
+ without modifying the original"]
510
516
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
511
517
#[ inline]
512
518
pub fn escape_default ( self ) -> EscapeDefault {
You can’t perform that action at this time.
0 commit comments