File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -377,6 +377,8 @@ impl char {
377377 /// ```
378378 /// assert_eq!('❤'.escape_unicode().to_string(), "\\u{2764}");
379379 /// ```
380+ #[ must_use = "this returns the escaped char as an iterator, \
381+ without modifying the original"]
380382 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
381383 #[ inline]
382384 pub fn escape_unicode ( self ) -> EscapeUnicode {
@@ -453,6 +455,8 @@ impl char {
453455 /// ```
454456 /// assert_eq!('\n'.escape_debug().to_string(), "\\n");
455457 /// ```
458+ #[ must_use = "this returns the escaped char as an iterator, \
459+ without modifying the original"]
456460 #[ stable( feature = "char_escape_debug" , since = "1.20.0" ) ]
457461 #[ inline]
458462 pub fn escape_debug ( self ) -> EscapeDebug {
@@ -507,6 +511,8 @@ impl char {
507511 /// ```
508512 /// assert_eq!('"'.escape_default().to_string(), "\\\"");
509513 /// ```
514+ #[ must_use = "this returns the escaped char as an iterator, \
515+ without modifying the original"]
510516 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
511517 #[ inline]
512518 pub fn escape_default ( self ) -> EscapeDefault {
You can’t perform that action at this time.
0 commit comments