Skip to content

Commit 9de6bcd

Browse files
nik-revepage
andauthored
Add drawback about dr"..." strings
Co-authored-by: Ed Page <[email protected]>
1 parent acda9b2 commit 9de6bcd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

text/3830-dedented-string-literals.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,8 @@ let _ = d"
941941
# Drawbacks
942942
[drawbacks]: #drawbacks
943943

944+
- While the reference specifies `r` as ["not processing ay escapes"](https://doc.rust-lang.org/reference/tokens.html#raw-string-literals), users are less likely familiar with the exact definition and more familiar with the name and the affect: it leaves the string as-is. This can feel contradictory to `d` which is a specific form of modifying the string content and so a `dr""` could read as something that should be a compilation error.
945+
944946
- The more string literal modifiers that are stacked on each other, more work is needed to decipher it and can feel a bit too foreign
945947

946948
- Contributes to the increase of string literal modifiers by adding a new variant.

0 commit comments

Comments
 (0)